OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" | 5 #include "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return client.Pass(); | 98 return client.Pass(); |
99 } | 99 } |
100 | 100 |
101 // static | 101 // static |
102 void IOSChromeMetricsServiceClient::RegisterPrefs( | 102 void IOSChromeMetricsServiceClient::RegisterPrefs( |
103 PrefRegistrySimple* registry) { | 103 PrefRegistrySimple* registry) { |
104 metrics::MetricsService::RegisterPrefs(registry); | 104 metrics::MetricsService::RegisterPrefs(registry); |
105 metrics::StabilityMetricsHelper::RegisterPrefs(registry); | 105 metrics::StabilityMetricsHelper::RegisterPrefs(registry); |
106 } | 106 } |
107 | 107 |
108 metrics::MetricsService* IOSChromeMetricsServiceClient::GetMetricsService() { | |
109 return metrics_service_.get(); | |
110 } | |
111 | |
112 void IOSChromeMetricsServiceClient::SetMetricsClientId( | 108 void IOSChromeMetricsServiceClient::SetMetricsClientId( |
113 const std::string& client_id) { | 109 const std::string& client_id) { |
114 crash_keys::SetMetricsClientIdFromGUID(client_id); | 110 crash_keys::SetMetricsClientIdFromGUID(client_id); |
115 } | 111 } |
116 | 112 |
117 void IOSChromeMetricsServiceClient::OnRecordingDisabled() { | 113 void IOSChromeMetricsServiceClient::OnRecordingDisabled() { |
118 crash_keys::ClearMetricsClientId(); | 114 crash_keys::ClearMetricsClientId(); |
119 } | 115 } |
120 | 116 |
121 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 117 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 base::Unretained(this))); | 318 base::Unretained(this))); |
323 } | 319 } |
324 | 320 |
325 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) { | 321 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) { |
326 metrics_service_->OnApplicationNotIdle(); | 322 metrics_service_->OnApplicationNotIdle(); |
327 } | 323 } |
328 | 324 |
329 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 325 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
330 metrics_service_->OnApplicationNotIdle(); | 326 metrics_service_->OnApplicationNotIdle(); |
331 } | 327 } |
OLD | NEW |