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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 metrics::MetricsService* IOSChromeMetricsServiceClient::GetMetricsService() { | 96 metrics::MetricsService* IOSChromeMetricsServiceClient::GetMetricsService() { |
97 return metrics_service_.get(); | 97 return metrics_service_.get(); |
98 } | 98 } |
99 | 99 |
100 void IOSChromeMetricsServiceClient::SetMetricsClientId( | 100 void IOSChromeMetricsServiceClient::SetMetricsClientId( |
101 const std::string& client_id) { | 101 const std::string& client_id) { |
102 crash_keys::SetMetricsClientIdFromGUID(client_id); | 102 crash_keys::SetMetricsClientIdFromGUID(client_id); |
103 } | 103 } |
104 | 104 |
105 void IOSChromeMetricsServiceClient::OnRecordingDisabled() { | |
106 crash_keys::ClearMetricsClientId(); | |
107 } | |
108 | |
109 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 105 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
110 return ::IsOffTheRecordSessionActive(); | 106 return ::IsOffTheRecordSessionActive(); |
111 } | 107 } |
112 | 108 |
113 int32_t IOSChromeMetricsServiceClient::GetProduct() { | 109 int32_t IOSChromeMetricsServiceClient::GetProduct() { |
114 return metrics::ChromeUserMetricsExtension::CHROME; | 110 return metrics::ChromeUserMetricsExtension::CHROME; |
115 } | 111 } |
116 | 112 |
117 std::string IOSChromeMetricsServiceClient::GetApplicationLocale() { | 113 std::string IOSChromeMetricsServiceClient::GetApplicationLocale() { |
118 return GetApplicationContext()->GetApplicationLocale(); | 114 return GetApplicationContext()->GetApplicationLocale(); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 311 |
316 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 312 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
317 metrics_service_->OnApplicationNotIdle(); | 313 metrics_service_->OnApplicationNotIdle(); |
318 } | 314 } |
319 | 315 |
320 metrics::EnableMetricsDefault | 316 metrics::EnableMetricsDefault |
321 IOSChromeMetricsServiceClient::GetMetricsReportingDefaultState() { | 317 IOSChromeMetricsServiceClient::GetMetricsReportingDefaultState() { |
322 return metrics::GetMetricsReportingDefaultState( | 318 return metrics::GetMetricsReportingDefaultState( |
323 GetApplicationContext()->GetLocalState()); | 319 GetApplicationContext()->GetLocalState()); |
324 } | 320 } |
OLD | NEW |