| 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> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 metrics::MetricsService* ChromeMetricsServiceClient::GetMetricsService() { | 229 metrics::MetricsService* ChromeMetricsServiceClient::GetMetricsService() { |
| 230 return metrics_service_.get(); | 230 return metrics_service_.get(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void ChromeMetricsServiceClient::SetMetricsClientId( | 233 void ChromeMetricsServiceClient::SetMetricsClientId( |
| 234 const std::string& client_id) { | 234 const std::string& client_id) { |
| 235 crash_keys::SetMetricsClientIdFromGUID(client_id); | 235 crash_keys::SetMetricsClientIdFromGUID(client_id); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void ChromeMetricsServiceClient::OnRecordingDisabled() { | 238 void ChromeMetricsServiceClient::OnRecordingDisabled() { |
| 239 crash_keys::ClearMetricsClientId(); | 239 // If we're shutting down, don't drop the metrics_client_id, so that late |
| 240 // crashes won't lose it. |
| 241 if (!g_browser_process->IsShuttingDown()) |
| 242 crash_keys::ClearMetricsClientId(); |
| 240 } | 243 } |
| 241 | 244 |
| 242 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 245 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
| 243 return chrome::IsOffTheRecordSessionActive(); | 246 return chrome::IsOffTheRecordSessionActive(); |
| 244 } | 247 } |
| 245 | 248 |
| 246 int32_t ChromeMetricsServiceClient::GetProduct() { | 249 int32_t ChromeMetricsServiceClient::GetProduct() { |
| 247 return metrics::ChromeUserMetricsExtension::CHROME; | 250 return metrics::ChromeUserMetricsExtension::CHROME; |
| 248 } | 251 } |
| 249 | 252 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 } | 694 } |
| 692 } | 695 } |
| 693 | 696 |
| 694 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 697 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
| 695 metrics_service_->OnApplicationNotIdle(); | 698 metrics_service_->OnApplicationNotIdle(); |
| 696 } | 699 } |
| 697 | 700 |
| 698 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { | 701 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { |
| 699 return IsCellularLogicEnabled(); | 702 return IsCellularLogicEnabled(); |
| 700 } | 703 } |
| OLD | NEW |