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 "android_webview/browser/aw_metrics_service_client.h" | 5 #include "android_webview/browser/aw_metrics_service_client.h" |
6 | 6 |
7 #include "android_webview/common/aw_version_info_values.h" | 7 #include "android_webview/common/aw_version_info_values.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/guid.h" | 10 #include "base/guid.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return metrics_service_.get(); | 157 return metrics_service_.get(); |
158 } | 158 } |
159 | 159 |
160 // In Chrome, UMA and Breakpad are enabled/disabled together by the same | 160 // In Chrome, UMA and Breakpad are enabled/disabled together by the same |
161 // checkbox and they share the same client ID (a.k.a. GUID). SetMetricsClientId | 161 // checkbox and they share the same client ID (a.k.a. GUID). SetMetricsClientId |
162 // is intended to provide the ID to Breakpad. In WebView, UMA and Breakpad are | 162 // is intended to provide the ID to Breakpad. In WebView, UMA and Breakpad are |
163 // independent, so this is a no-op. | 163 // independent, so this is a no-op. |
164 | 164 |
165 void AwMetricsServiceClient::SetMetricsClientId(const std::string& client_id) {} | 165 void AwMetricsServiceClient::SetMetricsClientId(const std::string& client_id) {} |
166 | 166 |
167 bool AwMetricsServiceClient::IsOffTheRecordSessionActive() { | |
168 // WebView has no incognito mode. | |
169 return false; | |
170 } | |
171 | |
172 int32_t AwMetricsServiceClient::GetProduct() { | 167 int32_t AwMetricsServiceClient::GetProduct() { |
173 return ::metrics::ChromeUserMetricsExtension::ANDROID_WEBVIEW; | 168 return ::metrics::ChromeUserMetricsExtension::ANDROID_WEBVIEW; |
174 } | 169 } |
175 | 170 |
176 std::string AwMetricsServiceClient::GetApplicationLocale() { | 171 std::string AwMetricsServiceClient::GetApplicationLocale() { |
177 return base::i18n::GetConfiguredLocale(); | 172 return base::i18n::GetConfiguredLocale(); |
178 } | 173 } |
179 | 174 |
180 bool AwMetricsServiceClient::GetBrand(std::string* brand_code) { | 175 bool AwMetricsServiceClient::GetBrand(std::string* brand_code) { |
181 // WebView doesn't use brand codes. | 176 // WebView doesn't use brand codes. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 214 |
220 AwMetricsServiceClient::AwMetricsServiceClient() | 215 AwMetricsServiceClient::AwMetricsServiceClient() |
221 : is_initialized_(false), | 216 : is_initialized_(false), |
222 is_enabled_(false), | 217 is_enabled_(false), |
223 pref_service_(nullptr), | 218 pref_service_(nullptr), |
224 request_context_(nullptr) {} | 219 request_context_(nullptr) {} |
225 | 220 |
226 AwMetricsServiceClient::~AwMetricsServiceClient() {} | 221 AwMetricsServiceClient::~AwMetricsServiceClient() {} |
227 | 222 |
228 } // namespace android_webview | 223 } // namespace android_webview |
OLD | NEW |