OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/metrics/chrome_metrics_service_client.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" |
6 | 6 |
| 7 #include <stddef.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" |
17 #include "base/rand_util.h" | 19 #include "base/rand_util.h" |
18 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
19 #include "base/threading/platform_thread.h" | 21 #include "base/threading/platform_thread.h" |
| 22 #include "build/build_config.h" |
20 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
21 #include "chrome/browser/chrome_notification_types.h" | 24 #include "chrome/browser/chrome_notification_types.h" |
22 #include "chrome/browser/google/google_brand.h" | 25 #include "chrome/browser/google/google_brand.h" |
23 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h" | 26 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h" |
24 #include "chrome/browser/metrics/time_ticks_experiment_win.h" | 27 #include "chrome/browser/metrics/time_ticks_experiment_win.h" |
25 #include "chrome/browser/ui/browser_otr_state.h" | 28 #include "chrome/browser/ui/browser_otr_state.h" |
26 #include "chrome/common/channel_info.h" | 29 #include "chrome/common/channel_info.h" |
27 #include "chrome/common/chrome_constants.h" | 30 #include "chrome/common/chrome_constants.h" |
28 #include "chrome/common/chrome_paths.h" | 31 #include "chrome/common/chrome_paths.h" |
29 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 193 } |
191 | 194 |
192 void ChromeMetricsServiceClient::OnRecordingDisabled() { | 195 void ChromeMetricsServiceClient::OnRecordingDisabled() { |
193 crash_keys::ClearMetricsClientId(); | 196 crash_keys::ClearMetricsClientId(); |
194 } | 197 } |
195 | 198 |
196 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 199 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
197 return chrome::IsOffTheRecordSessionActive(); | 200 return chrome::IsOffTheRecordSessionActive(); |
198 } | 201 } |
199 | 202 |
200 int32 ChromeMetricsServiceClient::GetProduct() { | 203 int32_t ChromeMetricsServiceClient::GetProduct() { |
201 return metrics::ChromeUserMetricsExtension::CHROME; | 204 return metrics::ChromeUserMetricsExtension::CHROME; |
202 } | 205 } |
203 | 206 |
204 std::string ChromeMetricsServiceClient::GetApplicationLocale() { | 207 std::string ChromeMetricsServiceClient::GetApplicationLocale() { |
205 return g_browser_process->GetApplicationLocale(); | 208 return g_browser_process->GetApplicationLocale(); |
206 } | 209 } |
207 | 210 |
208 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { | 211 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { |
209 return google_brand::GetBrand(brand_code); | 212 return google_brand::GetBrand(brand_code); |
210 } | 213 } |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 break; | 607 break; |
605 | 608 |
606 default: | 609 default: |
607 NOTREACHED(); | 610 NOTREACHED(); |
608 } | 611 } |
609 } | 612 } |
610 | 613 |
611 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 614 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
612 metrics_service_->OnApplicationNotIdle(); | 615 metrics_service_->OnApplicationNotIdle(); |
613 } | 616 } |
OLD | NEW |