OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/arc/metrics/arc_metrics_service.h" | 5 #include "components/arc/metrics/arc_metrics_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 auto* instance = | 122 auto* instance = |
123 arc_bridge_service()->metrics()->GetInstanceForMethod("Init"); | 123 arc_bridge_service()->metrics()->GetInstanceForMethod("Init"); |
124 if (!instance) | 124 if (!instance) |
125 return; | 125 return; |
126 | 126 |
127 // The binding of host interface is deferred until the ARC start time is | 127 // The binding of host interface is deferred until the ARC start time is |
128 // retrieved here because it prevents race condition of the ARC start | 128 // retrieved here because it prevents race condition of the ARC start |
129 // time availability in ReportBootProgress(). | 129 // time availability in ReportBootProgress(). |
130 if (!binding_.is_bound()) { | 130 if (!binding_.is_bound()) { |
131 mojom::MetricsHostPtr host_ptr; | 131 mojom::MetricsHostPtr host_ptr; |
132 binding_.Bind(mojo::GetProxy(&host_ptr)); | 132 binding_.Bind(mojo::MakeRequest(&host_ptr)); |
133 instance->Init(std::move(host_ptr)); | 133 instance->Init(std::move(host_ptr)); |
134 } | 134 } |
135 arc_start_time_ = arc_start_time; | 135 arc_start_time_ = arc_start_time; |
136 VLOG(2) << "ARC start @" << arc_start_time_; | 136 VLOG(2) << "ARC start @" << arc_start_time_; |
137 } | 137 } |
138 | 138 |
139 void ArcMetricsService::ReportBootProgress( | 139 void ArcMetricsService::ReportBootProgress( |
140 std::vector<mojom::BootProgressEventPtr> events) { | 140 std::vector<mojom::BootProgressEventPtr> events) { |
141 DCHECK(CalledOnValidThread()); | 141 DCHECK(CalledOnValidThread()); |
142 int64_t arc_start_time_in_ms = | 142 int64_t arc_start_time_in_ms = |
(...skipping 25 matching lines...) Expand all Loading... |
168 | 168 |
169 void ArcMetricsService::ProcessObserver::OnInstanceReady() { | 169 void ArcMetricsService::ProcessObserver::OnInstanceReady() { |
170 arc_metrics_service_->OnProcessInstanceReady(); | 170 arc_metrics_service_->OnProcessInstanceReady(); |
171 } | 171 } |
172 | 172 |
173 void ArcMetricsService::ProcessObserver::OnInstanceClosed() { | 173 void ArcMetricsService::ProcessObserver::OnInstanceClosed() { |
174 arc_metrics_service_->OnProcessInstanceClosed(); | 174 arc_metrics_service_->OnProcessInstanceClosed(); |
175 } | 175 } |
176 | 176 |
177 } // namespace arc | 177 } // namespace arc |
OLD | NEW |