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

Side by Side Diff: chrome/browser/history/history_service_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/history/history_service_factory.h" 5 #include "chrome/browser/history/history_service_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
9 #include "chrome/browser/history/chrome_history_client.h" 9 #include "chrome/browser/history/chrome_history_client.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // static 49 // static
50 history::HistoryService* HistoryServiceFactory::GetForProfileWithoutCreating( 50 history::HistoryService* HistoryServiceFactory::GetForProfileWithoutCreating(
51 Profile* profile) { 51 Profile* profile) {
52 return static_cast<history::HistoryService*>( 52 return static_cast<history::HistoryService*>(
53 GetInstance()->GetServiceForBrowserContext(profile, false)); 53 GetInstance()->GetServiceForBrowserContext(profile, false));
54 } 54 }
55 55
56 // static 56 // static
57 HistoryServiceFactory* HistoryServiceFactory::GetInstance() { 57 HistoryServiceFactory* HistoryServiceFactory::GetInstance() {
58 return Singleton<HistoryServiceFactory>::get(); 58 return base::Singleton<HistoryServiceFactory>::get();
59 } 59 }
60 60
61 // static 61 // static
62 void HistoryServiceFactory::ShutdownForProfile(Profile* profile) { 62 void HistoryServiceFactory::ShutdownForProfile(Profile* profile) {
63 HistoryServiceFactory* factory = GetInstance(); 63 HistoryServiceFactory* factory = GetInstance();
64 factory->BrowserContextDestroyed(profile); 64 factory->BrowserContextDestroyed(profile);
65 } 65 }
66 66
67 HistoryServiceFactory::HistoryServiceFactory() 67 HistoryServiceFactory::HistoryServiceFactory()
68 : BrowserContextKeyedServiceFactory( 68 : BrowserContextKeyedServiceFactory(
(...skipping 22 matching lines...) Expand all
91 } 91 }
92 92
93 content::BrowserContext* HistoryServiceFactory::GetBrowserContextToUse( 93 content::BrowserContext* HistoryServiceFactory::GetBrowserContextToUse(
94 content::BrowserContext* context) const { 94 content::BrowserContext* context) const {
95 return chrome::GetBrowserContextRedirectedInIncognito(context); 95 return chrome::GetBrowserContextRedirectedInIncognito(context);
96 } 96 }
97 97
98 bool HistoryServiceFactory::ServiceIsNULLWhileTesting() const { 98 bool HistoryServiceFactory::ServiceIsNULLWhileTesting() const {
99 return true; 99 return true;
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_service_factory.h ('k') | chrome/browser/history/top_sites_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698