| 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> |
| 8 |
| 7 #include <vector> | 9 #include <vector> |
| 8 | 10 |
| 9 #include "base/bind.h" | 11 #include "base/bind.h" |
| 10 #include "base/callback.h" | 12 #include "base/callback.h" |
| 11 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 12 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 13 #include "base/logging.h" | 15 #include "base/logging.h" |
| 14 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 15 #include "base/prefs/pref_registry_simple.h" | 17 #include "base/prefs/pref_registry_simple.h" |
| 16 #include "base/prefs/pref_service.h" | 18 #include "base/prefs/pref_service.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 117 } |
| 116 | 118 |
| 117 void IOSChromeMetricsServiceClient::OnRecordingDisabled() { | 119 void IOSChromeMetricsServiceClient::OnRecordingDisabled() { |
| 118 crash_keys::ClearMetricsClientId(); | 120 crash_keys::ClearMetricsClientId(); |
| 119 } | 121 } |
| 120 | 122 |
| 121 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 123 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
| 122 return ::IsOffTheRecordSessionActive(); | 124 return ::IsOffTheRecordSessionActive(); |
| 123 } | 125 } |
| 124 | 126 |
| 125 int32 IOSChromeMetricsServiceClient::GetProduct() { | 127 int32_t IOSChromeMetricsServiceClient::GetProduct() { |
| 126 return metrics::ChromeUserMetricsExtension::CHROME; | 128 return metrics::ChromeUserMetricsExtension::CHROME; |
| 127 } | 129 } |
| 128 | 130 |
| 129 std::string IOSChromeMetricsServiceClient::GetApplicationLocale() { | 131 std::string IOSChromeMetricsServiceClient::GetApplicationLocale() { |
| 130 return GetApplicationContext()->GetApplicationLocale(); | 132 return GetApplicationContext()->GetApplicationLocale(); |
| 131 } | 133 } |
| 132 | 134 |
| 133 bool IOSChromeMetricsServiceClient::GetBrand(std::string* brand_code) { | 135 bool IOSChromeMetricsServiceClient::GetBrand(std::string* brand_code) { |
| 134 return ios::google_brand::GetBrand(brand_code); | 136 return ios::google_brand::GetBrand(brand_code); |
| 135 } | 137 } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 base::Unretained(this))); | 324 base::Unretained(this))); |
| 323 } | 325 } |
| 324 | 326 |
| 325 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) { | 327 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) { |
| 326 metrics_service_->OnApplicationNotIdle(); | 328 metrics_service_->OnApplicationNotIdle(); |
| 327 } | 329 } |
| 328 | 330 |
| 329 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 331 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
| 330 metrics_service_->OnApplicationNotIdle(); | 332 metrics_service_->OnApplicationNotIdle(); |
| 331 } | 333 } |
| OLD | NEW |