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

Side by Side Diff: chrome/browser/signin/account_tracker_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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/signin/account_tracker_service_factory.h" 5 #include "chrome/browser/signin/account_tracker_service_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/chrome_signin_client_factory.h" 9 #include "chrome/browser/signin/chrome_signin_client_factory.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // static 23 // static
24 AccountTrackerService* 24 AccountTrackerService*
25 AccountTrackerServiceFactory::GetForProfile(Profile* profile) { 25 AccountTrackerServiceFactory::GetForProfile(Profile* profile) {
26 return static_cast<AccountTrackerService*>( 26 return static_cast<AccountTrackerService*>(
27 GetInstance()->GetServiceForBrowserContext(profile, true)); 27 GetInstance()->GetServiceForBrowserContext(profile, true));
28 } 28 }
29 29
30 // static 30 // static
31 AccountTrackerServiceFactory* AccountTrackerServiceFactory::GetInstance() { 31 AccountTrackerServiceFactory* AccountTrackerServiceFactory::GetInstance() {
32 return Singleton<AccountTrackerServiceFactory>::get(); 32 return base::Singleton<AccountTrackerServiceFactory>::get();
33 } 33 }
34 34
35 void AccountTrackerServiceFactory::RegisterProfilePrefs( 35 void AccountTrackerServiceFactory::RegisterProfilePrefs(
36 user_prefs::PrefRegistrySyncable* registry) { 36 user_prefs::PrefRegistrySyncable* registry) {
37 AccountTrackerService::RegisterPrefs(registry); 37 AccountTrackerService::RegisterPrefs(registry);
38 } 38 }
39 39
40 KeyedService* AccountTrackerServiceFactory::BuildServiceInstanceFor( 40 KeyedService* AccountTrackerServiceFactory::BuildServiceInstanceFor(
41 content::BrowserContext* context) const { 41 content::BrowserContext* context) const {
42 Profile* profile = static_cast<Profile*>(context); 42 Profile* profile = static_cast<Profile*>(context);
43 AccountTrackerService* service = new AccountTrackerService(); 43 AccountTrackerService* service = new AccountTrackerService();
44 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile)); 44 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile));
45 return service; 45 return service;
46 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/account_tracker_service_factory.h ('k') | chrome/browser/signin/chrome_signin_client_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698