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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spellchecker/spellcheck_factory.h" 5 #include "chrome/browser/spellchecker/spellcheck_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/profiles/incognito_helpers.h" 8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/spellchecker/spellcheck_service.h" 9 #include "chrome/browser/spellchecker/spellcheck_service.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 20 matching lines...) Expand all
31 if (!host) 31 if (!host)
32 return NULL; 32 return NULL;
33 content::BrowserContext* context = host->GetBrowserContext(); 33 content::BrowserContext* context = host->GetBrowserContext();
34 if (!context) 34 if (!context)
35 return NULL; 35 return NULL;
36 return GetForContext(context); 36 return GetForContext(context);
37 } 37 }
38 38
39 // static 39 // static
40 SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() { 40 SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() {
41 return Singleton<SpellcheckServiceFactory>::get(); 41 return base::Singleton<SpellcheckServiceFactory>::get();
42 } 42 }
43 43
44 SpellcheckServiceFactory::SpellcheckServiceFactory() 44 SpellcheckServiceFactory::SpellcheckServiceFactory()
45 : BrowserContextKeyedServiceFactory( 45 : BrowserContextKeyedServiceFactory(
46 "SpellcheckService", 46 "SpellcheckService",
47 BrowserContextDependencyManager::GetInstance()) { 47 BrowserContextDependencyManager::GetInstance()) {
48 // TODO(erg): Uncomment these as they are initialized. 48 // TODO(erg): Uncomment these as they are initialized.
49 // DependsOn(RequestContextFactory::GetInstance()); 49 // DependsOn(RequestContextFactory::GetInstance());
50 } 50 }
51 51
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse( 89 content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
90 content::BrowserContext* context) const { 90 content::BrowserContext* context) const {
91 return chrome::GetBrowserContextRedirectedInIncognito(context); 91 return chrome::GetBrowserContextRedirectedInIncognito(context);
92 } 92 }
93 93
94 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const { 94 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const {
95 return true; 95 return true;
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_factory.h ('k') | chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698