| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/signin/signin_manager_factory.h" | 5 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 // static | 43 // static |
| 44 SigninManager* SigninManagerFactory::GetForBrowserStateIfExists( | 44 SigninManager* SigninManagerFactory::GetForBrowserStateIfExists( |
| 45 ios::ChromeBrowserState* browser_state) { | 45 ios::ChromeBrowserState* browser_state) { |
| 46 return static_cast<SigninManager*>( | 46 return static_cast<SigninManager*>( |
| 47 GetInstance()->GetServiceForBrowserState(browser_state, false)); | 47 GetInstance()->GetServiceForBrowserState(browser_state, false)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // static | 50 // static |
| 51 SigninManagerFactory* SigninManagerFactory::GetInstance() { | 51 SigninManagerFactory* SigninManagerFactory::GetInstance() { |
| 52 return Singleton<SigninManagerFactory>::get(); | 52 return base::Singleton<SigninManagerFactory>::get(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void SigninManagerFactory::RegisterBrowserStatePrefs( | 55 void SigninManagerFactory::RegisterBrowserStatePrefs( |
| 56 user_prefs::PrefRegistrySyncable* registry) { | 56 user_prefs::PrefRegistrySyncable* registry) { |
| 57 SigninManagerBase::RegisterProfilePrefs(registry); | 57 SigninManagerBase::RegisterProfilePrefs(registry); |
| 58 } | 58 } |
| 59 | 59 |
| 60 // static | 60 // static |
| 61 void SigninManagerFactory::RegisterPrefs(PrefRegistrySimple* registry) { | 61 void SigninManagerFactory::RegisterPrefs(PrefRegistrySimple* registry) { |
| 62 SigninManagerBase::RegisterPrefs(registry); | 62 SigninManagerBase::RegisterPrefs(registry); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void SigninManagerFactory::BrowserStateShutdown(web::BrowserState* context) { | 97 void SigninManagerFactory::BrowserStateShutdown(web::BrowserState* context) { |
| 98 SigninManager* manager = | 98 SigninManager* manager = |
| 99 static_cast<SigninManager*>(GetServiceForBrowserState(context, false)); | 99 static_cast<SigninManager*>(GetServiceForBrowserState(context, false)); |
| 100 if (manager) | 100 if (manager) |
| 101 FOR_EACH_OBSERVER(SigninManagerFactoryObserver, observer_list_, | 101 FOR_EACH_OBSERVER(SigninManagerFactoryObserver, observer_list_, |
| 102 SigninManagerShutdown(manager)); | 102 SigninManagerShutdown(manager)); |
| 103 BrowserStateKeyedServiceFactory::BrowserStateShutdown(context); | 103 BrowserStateKeyedServiceFactory::BrowserStateShutdown(context); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace ios | 106 } // namespace ios |
| OLD | NEW |