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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 metrics::MetricsService* IOSChromeMetricsServiceClient::GetMetricsService() { | 95 metrics::MetricsService* IOSChromeMetricsServiceClient::GetMetricsService() { |
96 return metrics_service_.get(); | 96 return metrics_service_.get(); |
97 } | 97 } |
98 | 98 |
99 void IOSChromeMetricsServiceClient::SetMetricsClientId( | 99 void IOSChromeMetricsServiceClient::SetMetricsClientId( |
100 const std::string& client_id) { | 100 const std::string& client_id) { |
101 crash_keys::SetMetricsClientIdFromGUID(client_id); | 101 crash_keys::SetMetricsClientIdFromGUID(client_id); |
102 } | 102 } |
103 | 103 |
104 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | |
105 return ::IsOffTheRecordSessionActive(); | |
106 } | |
107 | |
108 int32_t IOSChromeMetricsServiceClient::GetProduct() { | 104 int32_t IOSChromeMetricsServiceClient::GetProduct() { |
109 return metrics::ChromeUserMetricsExtension::CHROME; | 105 return metrics::ChromeUserMetricsExtension::CHROME; |
110 } | 106 } |
111 | 107 |
112 std::string IOSChromeMetricsServiceClient::GetApplicationLocale() { | 108 std::string IOSChromeMetricsServiceClient::GetApplicationLocale() { |
113 return GetApplicationContext()->GetApplicationLocale(); | 109 return GetApplicationContext()->GetApplicationLocale(); |
114 } | 110 } |
115 | 111 |
116 bool IOSChromeMetricsServiceClient::GetBrand(std::string* brand_code) { | 112 bool IOSChromeMetricsServiceClient::GetBrand(std::string* brand_code) { |
117 return ios::google_brand::GetBrand(brand_code); | 113 return ios::google_brand::GetBrand(brand_code); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 306 |
311 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 307 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
312 metrics_service_->OnApplicationNotIdle(); | 308 metrics_service_->OnApplicationNotIdle(); |
313 } | 309 } |
314 | 310 |
315 metrics::EnableMetricsDefault | 311 metrics::EnableMetricsDefault |
316 IOSChromeMetricsServiceClient::GetMetricsReportingDefaultState() { | 312 IOSChromeMetricsServiceClient::GetMetricsReportingDefaultState() { |
317 return metrics::GetMetricsReportingDefaultState( | 313 return metrics::GetMetricsReportingDefaultState( |
318 GetApplicationContext()->GetLocalState()); | 314 GetApplicationContext()->GetLocalState()); |
319 } | 315 } |
OLD | NEW |