Aashay, you suggested to use handle as cros_healthd is simply a proxy that forwards the stuff here. Is that something that would work using json? I'm not sure that works well or what else I can pass through that handle
hidehiko@, FYI as well
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Use same parser options as PowerRoutine for consistency.
std::optional<base::Value> parsed = base::JSONReader::Read(
file_contents, base::JSON_PARSE_CHROMIUM_EXTENSIONS);
if (!parsed || !parsed->is_dict()) {
DVLOG(2) << "GoogleServicesConnectivity routine: failed to parse JSON";
OnGoogleServicesConnectivityRoutineResult(routine_type, result,
std::move(problems));
return;
}
const base::Value::List* problems_list =
parsed->GetDict().FindList(kProblemsKey);
if (!problems_list) {
DVLOG(2) << "GoogleServicesConnectivity routine: missing 'problems' key";
OnGoogleServicesConnectivityRoutineResult(routine_type, result,
std::move(problems));
return;
}
for (const base::Value& problem_value : *problems_list) {
if (problem_value.is_dict()) {
auto problem =
ParseGoogleServicesConnectivityProblem(problem_value.GetDict());
if (problem) {
problems.push_back(std::move(problem));
}
}
}optional: can parsing be done in the background thread for better throughput of the main sequence, as you already read the file descriptor there?
inflight_routine_runner_->OnRoutineResult(std::move(result_info));May I ask you to confirm where this is going to be called?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |