Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: chrome/browser/metrics/chrome_metrics_service_client.cc

Issue 1894973005: Don't clear metrics_client_id on shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698