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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_factory.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/profile_resetter/automatic_profile_resetter_factory.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/prefs/pref_registry_simple.h" 8 #include "base/prefs/pref_registry_simple.h"
9 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h" 9 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search_engines/template_url_service_factory.h" 11 #include "chrome/browser/search_engines/template_url_service_factory.h"
12 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 12 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "components/keyed_service/content/browser_context_dependency_manager.h" 14 #include "components/keyed_service/content/browser_context_dependency_manager.h"
15 #include "components/pref_registry/pref_registry_syncable.h" 15 #include "components/pref_registry/pref_registry_syncable.h"
16 #include "content/public/browser/browser_context.h" 16 #include "content/public/browser/browser_context.h"
17 17
18 // static 18 // static
19 AutomaticProfileResetter* AutomaticProfileResetterFactory::GetForBrowserContext( 19 AutomaticProfileResetter* AutomaticProfileResetterFactory::GetForBrowserContext(
20 content::BrowserContext* context) { 20 content::BrowserContext* context) {
21 return static_cast<AutomaticProfileResetter*>( 21 return static_cast<AutomaticProfileResetter*>(
22 GetInstance()->GetServiceForBrowserContext(context, true)); 22 GetInstance()->GetServiceForBrowserContext(context, true));
23 } 23 }
24 24
25 // static 25 // static
26 AutomaticProfileResetterFactory* 26 AutomaticProfileResetterFactory*
27 AutomaticProfileResetterFactory::GetInstance() { 27 AutomaticProfileResetterFactory::GetInstance() {
28 return Singleton<AutomaticProfileResetterFactory>::get(); 28 return base::Singleton<AutomaticProfileResetterFactory>::get();
29 } 29 }
30 30
31 // static 31 // static
32 void AutomaticProfileResetterFactory::RegisterPrefs( 32 void AutomaticProfileResetterFactory::RegisterPrefs(
33 PrefRegistrySimple* registry) { 33 PrefRegistrySimple* registry) {
34 registry->RegisterDictionaryPref( 34 registry->RegisterDictionaryPref(
35 prefs::kProfileResetPromptMementosInLocalState); 35 prefs::kProfileResetPromptMementosInLocalState);
36 } 36 }
37 37
38 AutomaticProfileResetterFactory::AutomaticProfileResetterFactory() 38 AutomaticProfileResetterFactory::AutomaticProfileResetterFactory()
(...skipping 22 matching lines...) Expand all
61 } 61 }
62 62
63 bool AutomaticProfileResetterFactory:: 63 bool AutomaticProfileResetterFactory::
64 ServiceIsCreatedWithBrowserContext() const { 64 ServiceIsCreatedWithBrowserContext() const {
65 return true; 65 return true;
66 } 66 }
67 67
68 bool AutomaticProfileResetterFactory::ServiceIsNULLWhileTesting() const { 68 bool AutomaticProfileResetterFactory::ServiceIsNULLWhileTesting() const {
69 return true; 69 return true;
70 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698