| Index: components/arc/metrics/arc_metrics_service.cc
|
| diff --git a/components/arc/metrics/arc_metrics_service.cc b/components/arc/metrics/arc_metrics_service.cc
|
| index 826f064740039dbd0ef4176b81d5c3c59ecbfabe..bb4cf9d8d402c86e3b8a989506a7ce57287e115b 100644
|
| --- a/components/arc/metrics/arc_metrics_service.cc
|
| +++ b/components/arc/metrics/arc_metrics_service.cc
|
| @@ -76,12 +76,10 @@ void ArcMetricsService::OnProcessInstanceClosed() {
|
|
|
| void ArcMetricsService::RequestProcessList() {
|
| mojom::ProcessInstance* process_instance =
|
| - arc_bridge_service()->process()->instance();
|
| - if (!process_instance) {
|
| - LOG(ERROR) << "No process instance found before RequestProcessList";
|
| + arc_bridge_service()->process()->GetInstanceForMethod(
|
| + "RequestProcessList");
|
| + if (!process_instance)
|
| return;
|
| - }
|
| -
|
| VLOG(2) << "RequestProcessList";
|
| process_instance->RequestProcessList(base::Bind(
|
| &ArcMetricsService::ParseProcessList, weak_ptr_factory_.GetWeakPtr()));
|
| @@ -121,10 +119,10 @@ void ArcMetricsService::OnArcStartTimeRetrieved(
|
| LOG(ERROR) << "Failed to retrieve ARC start timeticks.";
|
| return;
|
| }
|
| - if (!arc_bridge_service()->metrics()->instance()) {
|
| - LOG(ERROR) << "ARC metrics instance went away while retrieving start time.";
|
| + auto* instance =
|
| + arc_bridge_service()->metrics()->GetInstanceForMethod("Init");
|
| + if (!instance)
|
| return;
|
| - }
|
|
|
| // The binding of host interface is deferred until the ARC start time is
|
| // retrieved here because it prevents race condition of the ARC start
|
| @@ -132,7 +130,7 @@ void ArcMetricsService::OnArcStartTimeRetrieved(
|
| if (!binding_.is_bound()) {
|
| mojom::MetricsHostPtr host_ptr;
|
| binding_.Bind(mojo::GetProxy(&host_ptr));
|
| - arc_bridge_service()->metrics()->instance()->Init(std::move(host_ptr));
|
| + instance->Init(std::move(host_ptr));
|
| }
|
| arc_start_time_ = arc_start_time;
|
| VLOG(2) << "ARC start @" << arc_start_time_;
|
|
|