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

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

Issue 502173002: Move more metrics classes to metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test compile. Created 6 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/metrics_services_manager.h" 5 #include "chrome/browser/metrics/metrics_services_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 12 matching lines...) Expand all
23 #endif 23 #endif
24 24
25 MetricsServicesManager::MetricsServicesManager(PrefService* local_state) 25 MetricsServicesManager::MetricsServicesManager(PrefService* local_state)
26 : local_state_(local_state) { 26 : local_state_(local_state) {
27 DCHECK(local_state); 27 DCHECK(local_state);
28 } 28 }
29 29
30 MetricsServicesManager::~MetricsServicesManager() { 30 MetricsServicesManager::~MetricsServicesManager() {
31 } 31 }
32 32
33 MetricsService* MetricsServicesManager::GetMetricsService() { 33 metrics::MetricsService* MetricsServicesManager::GetMetricsService() {
34 DCHECK(thread_checker_.CalledOnValidThread()); 34 DCHECK(thread_checker_.CalledOnValidThread());
35 return GetChromeMetricsServiceClient()->metrics_service(); 35 return GetChromeMetricsServiceClient()->metrics_service();
36 } 36 }
37 37
38 rappor::RapporService* MetricsServicesManager::GetRapporService() { 38 rappor::RapporService* MetricsServicesManager::GetRapporService() {
39 DCHECK(thread_checker_.CalledOnValidThread()); 39 DCHECK(thread_checker_.CalledOnValidThread());
40 if (!rappor_service_) 40 if (!rappor_service_)
41 rappor_service_.reset(new rappor::RapporService); 41 rappor_service_.reset(new rappor::RapporService);
42 return rappor_service_.get(); 42 return rappor_service_.get();
43 } 43 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #if defined(GOOGLE_CHROME_BUILD) 94 #if defined(GOOGLE_CHROME_BUILD)
95 #if defined(OS_CHROMEOS) 95 #if defined(OS_CHROMEOS)
96 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, 96 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
97 &enabled); 97 &enabled);
98 #else 98 #else
99 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled); 99 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled);
100 #endif // #if defined(OS_CHROMEOS) 100 #endif // #if defined(OS_CHROMEOS)
101 #endif // defined(GOOGLE_CHROME_BUILD) 101 #endif // defined(GOOGLE_CHROME_BUILD)
102 return enabled; 102 return enabled;
103 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_services_manager.h ('k') | chrome/browser/metrics/omnibox_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698