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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 152 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
153 return is_enabled_; | 153 return is_enabled_; |
154 } | 154 } |
155 | 155 |
156 metrics::MetricsService* AwMetricsServiceClient::GetMetricsService() { | 156 metrics::MetricsService* AwMetricsServiceClient::GetMetricsService() { |
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 // and OnRecordingDisabled are intended to provide the ID to Breakpad. In | 162 // is intended to provide the ID to Breakpad. In WebView, UMA and Breakpad are |
163 // WebView, UMA and Breakpad are independent, so these are no-ops. | 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 void AwMetricsServiceClient::OnRecordingDisabled() {} | |
168 | |
169 bool AwMetricsServiceClient::IsOffTheRecordSessionActive() { | 167 bool AwMetricsServiceClient::IsOffTheRecordSessionActive() { |
170 // WebView has no incognito mode. | 168 // WebView has no incognito mode. |
171 return false; | 169 return false; |
172 } | 170 } |
173 | 171 |
174 int32_t AwMetricsServiceClient::GetProduct() { | 172 int32_t AwMetricsServiceClient::GetProduct() { |
175 return ::metrics::ChromeUserMetricsExtension::ANDROID_WEBVIEW; | 173 return ::metrics::ChromeUserMetricsExtension::ANDROID_WEBVIEW; |
176 } | 174 } |
177 | 175 |
178 std::string AwMetricsServiceClient::GetApplicationLocale() { | 176 std::string AwMetricsServiceClient::GetApplicationLocale() { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 219 |
222 AwMetricsServiceClient::AwMetricsServiceClient() | 220 AwMetricsServiceClient::AwMetricsServiceClient() |
223 : is_initialized_(false), | 221 : is_initialized_(false), |
224 is_enabled_(false), | 222 is_enabled_(false), |
225 pref_service_(nullptr), | 223 pref_service_(nullptr), |
226 request_context_(nullptr) {} | 224 request_context_(nullptr) {} |
227 | 225 |
228 AwMetricsServiceClient::~AwMetricsServiceClient() {} | 226 AwMetricsServiceClient::~AwMetricsServiceClient() {} |
229 | 227 |
230 } // namespace android_webview | 228 } // namespace android_webview |
OLD | NEW |