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

Side by Side Diff: chrome/browser/prefs/pref_metrics_service.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/prefs/pref_metrics_service.h" 5 #include "chrome/browser/prefs/pref_metrics_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 histogram_name, 205 histogram_name,
206 1, 206 1,
207 boundary_value, 207 boundary_value,
208 boundary_value + 1, 208 boundary_value + 1,
209 base::HistogramBase::kUmaTargetedHistogramFlag); 209 base::HistogramBase::kUmaTargetedHistogramFlag);
210 histogram->Add(integer_value); 210 histogram->Add(integer_value);
211 } 211 }
212 212
213 // static 213 // static
214 PrefMetricsService::Factory* PrefMetricsService::Factory::GetInstance() { 214 PrefMetricsService::Factory* PrefMetricsService::Factory::GetInstance() {
215 return Singleton<PrefMetricsService::Factory>::get(); 215 return base::Singleton<PrefMetricsService::Factory>::get();
216 } 216 }
217 217
218 // static 218 // static
219 PrefMetricsService* PrefMetricsService::Factory::GetForProfile( 219 PrefMetricsService* PrefMetricsService::Factory::GetForProfile(
220 Profile* profile) { 220 Profile* profile) {
221 return static_cast<PrefMetricsService*>( 221 return static_cast<PrefMetricsService*>(
222 GetInstance()->GetServiceForBrowserContext(profile, true)); 222 GetInstance()->GetServiceForBrowserContext(profile, true));
223 } 223 }
224 224
225 PrefMetricsService::Factory::Factory() 225 PrefMetricsService::Factory::Factory()
(...skipping 16 matching lines...) Expand all
242 } 242 }
243 243
244 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const { 244 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const {
245 return false; 245 return false;
246 } 246 }
247 247
248 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse( 248 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse(
249 content::BrowserContext* context) const { 249 content::BrowserContext* context) const {
250 return chrome::GetBrowserContextRedirectedInIncognito(context); 250 return chrome::GetBrowserContextRedirectedInIncognito(context);
251 } 251 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_metrics_service.h ('k') | chrome/browser/prerender/prerender_link_manager_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698