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

Side by Side Diff: chrome/browser/history/web_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/web_history_service_factory.h" 5 #include "chrome/browser/history/web_history_service_factory.h"
6 6
7 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 7 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
8 #include "chrome/browser/signin/signin_manager_factory.h" 8 #include "chrome/browser/signin/signin_manager_factory.h"
9 #include "chrome/browser/sync/profile_sync_service.h" 9 #include "chrome/browser/sync/profile_sync_service.h"
10 #include "chrome/browser/sync/profile_sync_service_factory.h" 10 #include "chrome/browser/sync/profile_sync_service_factory.h"
(...skipping 11 matching lines...) Expand all
22 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); 22 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
23 return sync && 23 return sync &&
24 sync->IsSyncActive() && 24 sync->IsSyncActive() &&
25 sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); 25 sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES);
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
30 // static 30 // static
31 WebHistoryServiceFactory* WebHistoryServiceFactory::GetInstance() { 31 WebHistoryServiceFactory* WebHistoryServiceFactory::GetInstance() {
32 return Singleton<WebHistoryServiceFactory>::get(); 32 return base::Singleton<WebHistoryServiceFactory>::get();
33 } 33 }
34 34
35 // static 35 // static
36 history::WebHistoryService* WebHistoryServiceFactory::GetForProfile( 36 history::WebHistoryService* WebHistoryServiceFactory::GetForProfile(
37 Profile* profile) { 37 Profile* profile) {
38 if (!IsHistorySyncEnabled(profile)) 38 if (!IsHistorySyncEnabled(profile))
39 return nullptr; 39 return nullptr;
40 40
41 return static_cast<history::WebHistoryService*>( 41 return static_cast<history::WebHistoryService*>(
42 GetInstance()->GetServiceForBrowserContext(profile, true)); 42 GetInstance()->GetServiceForBrowserContext(profile, true));
(...skipping 16 matching lines...) Expand all
59 WebHistoryServiceFactory::WebHistoryServiceFactory() 59 WebHistoryServiceFactory::WebHistoryServiceFactory()
60 : BrowserContextKeyedServiceFactory( 60 : BrowserContextKeyedServiceFactory(
61 "WebHistoryServiceFactory", 61 "WebHistoryServiceFactory",
62 BrowserContextDependencyManager::GetInstance()) { 62 BrowserContextDependencyManager::GetInstance()) {
63 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 63 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
64 DependsOn(SigninManagerFactory::GetInstance()); 64 DependsOn(SigninManagerFactory::GetInstance());
65 } 65 }
66 66
67 WebHistoryServiceFactory::~WebHistoryServiceFactory() { 67 WebHistoryServiceFactory::~WebHistoryServiceFactory() {
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698