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

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

Issue 2248793002: Remove OnRecordingDisabled() metrics client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add helper function Created 4 years, 4 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
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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 metrics::MetricsService* ChromeMetricsServiceClient::GetMetricsService() { 278 metrics::MetricsService* ChromeMetricsServiceClient::GetMetricsService() {
279 return metrics_service_.get(); 279 return metrics_service_.get();
280 } 280 }
281 281
282 void ChromeMetricsServiceClient::SetMetricsClientId( 282 void ChromeMetricsServiceClient::SetMetricsClientId(
283 const std::string& client_id) { 283 const std::string& client_id) {
284 crash_keys::SetMetricsClientIdFromGUID(client_id); 284 crash_keys::SetMetricsClientIdFromGUID(client_id);
285 } 285 }
286 286
287 void ChromeMetricsServiceClient::OnRecordingDisabled() {
288 // If we're shutting down, don't drop the metrics_client_id, so that late
289 // crashes won't lose it.
290 if (!g_browser_process->IsShuttingDown())
291 crash_keys::ClearMetricsClientId();
292 }
293
294 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { 287 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() {
295 return chrome::IsIncognitoSessionActive(); 288 return chrome::IsIncognitoSessionActive();
296 } 289 }
297 290
298 int32_t ChromeMetricsServiceClient::GetProduct() { 291 int32_t ChromeMetricsServiceClient::GetProduct() {
299 return metrics::ChromeUserMetricsExtension::CHROME; 292 return metrics::ChromeUserMetricsExtension::CHROME;
300 } 293 }
301 294
302 std::string ChromeMetricsServiceClient::GetApplicationLocale() { 295 std::string ChromeMetricsServiceClient::GetApplicationLocale() {
303 return g_browser_process->GetApplicationLocale(); 296 return g_browser_process->GetApplicationLocale();
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 } 786 }
794 } 787 }
795 788
796 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { 789 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) {
797 metrics_service_->OnApplicationNotIdle(); 790 metrics_service_->OnApplicationNotIdle();
798 } 791 }
799 792
800 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { 793 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() {
801 return metrics::IsCellularLogicEnabled(); 794 return metrics::IsCellularLogicEnabled();
802 } 795 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698