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/metrics/cast_metrics_service_client.h" | 5 #include "chromecast/metrics/cast_metrics_service_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "chromecast/common/chromecast_config.h" | 9 #include "chromecast/common/chromecast_config.h" |
10 #include "chromecast/common/chromecast_switches.h" | 10 #include "chromecast/common/chromecast_switches.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 LOG(INFO) << "Metrics client ID set: " << client_id; | 47 LOG(INFO) << "Metrics client ID set: " << client_id; |
48 PlatformSetClientID(client_id); | 48 PlatformSetClientID(client_id); |
49 } | 49 } |
50 | 50 |
51 bool CastMetricsServiceClient::IsOffTheRecordSessionActive() { | 51 bool CastMetricsServiceClient::IsOffTheRecordSessionActive() { |
52 // Chromecast behaves as "off the record" w/r/t recording browsing state, | 52 // Chromecast behaves as "off the record" w/r/t recording browsing state, |
53 // but this value is about not disabling metrics because of it. | 53 // but this value is about not disabling metrics because of it. |
54 return false; | 54 return false; |
55 } | 55 } |
56 | 56 |
| 57 int32 CastMetricsServiceClient::GetProduct() { |
| 58 // Chromecast currently uses the same product identifier as Chrome. |
| 59 return metrics::ChromeUserMetricsExtension::CHROME; |
| 60 } |
| 61 |
57 std::string CastMetricsServiceClient::GetApplicationLocale() { | 62 std::string CastMetricsServiceClient::GetApplicationLocale() { |
58 return base::i18n::GetConfiguredLocale(); | 63 return base::i18n::GetConfiguredLocale(); |
59 } | 64 } |
60 | 65 |
61 bool CastMetricsServiceClient::GetBrand(std::string* brand_code) { | 66 bool CastMetricsServiceClient::GetBrand(std::string* brand_code) { |
62 return false; | 67 return false; |
63 } | 68 } |
64 | 69 |
65 ::metrics::SystemProfileProto::Channel CastMetricsServiceClient::GetChannel() { | 70 ::metrics::SystemProfileProto::Channel CastMetricsServiceClient::GetChannel() { |
66 return GetPlatformReleaseChannel(); | 71 return GetPlatformReleaseChannel(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 160 |
156 CastMetricsServiceClient::~CastMetricsServiceClient() { | 161 CastMetricsServiceClient::~CastMetricsServiceClient() { |
157 } | 162 } |
158 | 163 |
159 bool CastMetricsServiceClient::IsReportingEnabled() { | 164 bool CastMetricsServiceClient::IsReportingEnabled() { |
160 return PlatformIsReportingEnabled(); | 165 return PlatformIsReportingEnabled(); |
161 } | 166 } |
162 | 167 |
163 } // namespace metrics | 168 } // namespace metrics |
164 } // namespace chromecast | 169 } // namespace chromecast |
OLD | NEW |