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 "chromecast/browser/metrics/cast_metrics_service_client.h" | 5 #include "chromecast/browser/metrics/cast_metrics_service_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
12 #include "chromecast/base/chromecast_switches.h" | 12 #include "chromecast/base/chromecast_switches.h" |
13 #include "chromecast/browser/metrics/cast_stability_metrics_provider.h" | 13 #include "chromecast/browser/metrics/cast_stability_metrics_provider.h" |
14 #include "chromecast/browser/metrics/platform_metrics_providers.h" | 14 #include "chromecast/browser/metrics/platform_metrics_providers.h" |
15 #include "chromecast/common/pref_names.h" | 15 #include "chromecast/common/pref_names.h" |
16 #include "components/metrics/client_info.h" | 16 #include "components/metrics/client_info.h" |
17 #include "components/metrics/gpu/gpu_metrics_provider.h" | 17 #include "components/metrics/gpu/gpu_metrics_provider.h" |
18 #include "components/metrics/metrics_pref_names.h" | 18 #include "components/metrics/metrics_pref_names.h" |
gunsch
2015/05/29 20:14:30
I think you can remove this include now, too
Alexei Svitkine (slow)
2015/05/29 20:31:49
Done.
| |
19 #include "components/metrics/metrics_provider.h" | 19 #include "components/metrics/metrics_provider.h" |
20 #include "components/metrics/metrics_service.h" | 20 #include "components/metrics/metrics_service.h" |
21 #include "components/metrics/metrics_state_manager.h" | 21 #include "components/metrics/metrics_state_manager.h" |
22 #include "components/metrics/net/net_metrics_log_uploader.h" | 22 #include "components/metrics/net/net_metrics_log_uploader.h" |
23 #include "components/metrics/net/network_metrics_provider.h" | 23 #include "components/metrics/net/network_metrics_provider.h" |
24 #include "components/metrics/profiler/profiler_metrics_provider.h" | 24 #include "components/metrics/profiler/profiler_metrics_provider.h" |
25 #include "components/metrics/url_constants.h" | 25 #include "components/metrics/url_constants.h" |
26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
27 | 27 |
28 #if defined(OS_LINUX) | 28 #if defined(OS_LINUX) |
29 #include "chromecast/browser/metrics/external_metrics.h" | 29 #include "chromecast/browser/metrics/external_metrics.h" |
30 #endif // defined(OS_LINUX) | 30 #endif // defined(OS_LINUX) |
31 | 31 |
32 namespace chromecast { | 32 namespace chromecast { |
33 namespace metrics { | 33 namespace metrics { |
34 | 34 |
35 namespace { | 35 namespace { |
36 | |
36 const int kStandardUploadIntervalMinutes = 5; | 37 const int kStandardUploadIntervalMinutes = 5; |
38 | |
39 const char kMetricsOldClientID[] = "user_experience_metrics.client_id"; | |
40 | |
37 } // namespace | 41 } // namespace |
38 | 42 |
39 // static | 43 // static |
40 scoped_ptr<CastMetricsServiceClient> CastMetricsServiceClient::Create( | 44 scoped_ptr<CastMetricsServiceClient> CastMetricsServiceClient::Create( |
41 base::TaskRunner* io_task_runner, | 45 base::TaskRunner* io_task_runner, |
42 PrefService* pref_service, | 46 PrefService* pref_service, |
43 net::URLRequestContextGetter* request_context) { | 47 net::URLRequestContextGetter* request_context) { |
44 return make_scoped_ptr(new CastMetricsServiceClient(io_task_runner, | 48 return make_scoped_ptr(new CastMetricsServiceClient(io_task_runner, |
45 pref_service, | 49 pref_service, |
46 request_context)); | 50 request_context)); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 #endif // defined(OS_LINUX) | 277 #endif // defined(OS_LINUX) |
274 metrics_service_->Stop(); | 278 metrics_service_->Stop(); |
275 } | 279 } |
276 | 280 |
277 bool CastMetricsServiceClient::IsReportingEnabled() { | 281 bool CastMetricsServiceClient::IsReportingEnabled() { |
278 return PlatformIsReportingEnabled(cast_service_); | 282 return PlatformIsReportingEnabled(cast_service_); |
279 } | 283 } |
280 | 284 |
281 } // namespace metrics | 285 } // namespace metrics |
282 } // namespace chromecast | 286 } // namespace chromecast |
OLD | NEW |