| OLD | NEW |
| 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/signin/about_signin_internals_factory.h" | 5 #include "chrome/browser/signin/about_signin_internals_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/signin/account_tracker_service_factory.h" | 8 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
| 10 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" | 10 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // static | 32 // static |
| 33 AboutSigninInternals* AboutSigninInternalsFactory::GetForProfile( | 33 AboutSigninInternals* AboutSigninInternalsFactory::GetForProfile( |
| 34 Profile* profile) { | 34 Profile* profile) { |
| 35 return static_cast<AboutSigninInternals*>( | 35 return static_cast<AboutSigninInternals*>( |
| 36 GetInstance()->GetServiceForBrowserContext(profile, true)); | 36 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 // static | 39 // static |
| 40 AboutSigninInternalsFactory* AboutSigninInternalsFactory::GetInstance() { | 40 AboutSigninInternalsFactory* AboutSigninInternalsFactory::GetInstance() { |
| 41 return Singleton<AboutSigninInternalsFactory>::get(); | 41 return base::Singleton<AboutSigninInternalsFactory>::get(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void AboutSigninInternalsFactory::RegisterProfilePrefs( | 44 void AboutSigninInternalsFactory::RegisterProfilePrefs( |
| 45 user_prefs::PrefRegistrySyncable* user_prefs) { | 45 user_prefs::PrefRegistrySyncable* user_prefs) { |
| 46 AboutSigninInternals::RegisterPrefs(user_prefs); | 46 AboutSigninInternals::RegisterPrefs(user_prefs); |
| 47 } | 47 } |
| 48 | 48 |
| 49 KeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( | 49 KeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( |
| 50 content::BrowserContext* context) const { | 50 content::BrowserContext* context) const { |
| 51 Profile* profile = Profile::FromBrowserContext(context); | 51 Profile* profile = Profile::FromBrowserContext(context); |
| 52 AboutSigninInternals* service = new AboutSigninInternals( | 52 AboutSigninInternals* service = new AboutSigninInternals( |
| 53 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 53 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| 54 AccountTrackerServiceFactory::GetForProfile(profile), | 54 AccountTrackerServiceFactory::GetForProfile(profile), |
| 55 SigninManagerFactory::GetForProfile(profile), | 55 SigninManagerFactory::GetForProfile(profile), |
| 56 SigninErrorControllerFactory::GetForProfile(profile), | 56 SigninErrorControllerFactory::GetForProfile(profile), |
| 57 GaiaCookieManagerServiceFactory::GetForProfile(profile)); | 57 GaiaCookieManagerServiceFactory::GetForProfile(profile)); |
| 58 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile)); | 58 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile)); |
| 59 return service; | 59 return service; |
| 60 } | 60 } |
| OLD | NEW |