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/signin_manager_factory.h" | 5 #include "chrome/browser/signin/signin_manager_factory.h" |
6 | 6 |
7 #include "base/prefs/pref_registry_simple.h" | 7 #include "base/prefs/pref_registry_simple.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 10 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
11 #include "chrome/browser/signin/local_auth.h" | 11 #include "chrome/browser/signin/local_auth.h" |
12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 14 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 15 #include "components/pref_registry/pref_registry_syncable.h" |
15 #include "components/signin/core/browser/signin_manager.h" | 16 #include "components/signin/core/browser/signin_manager.h" |
16 #include "components/user_prefs/pref_registry_syncable.h" | |
17 | 17 |
18 SigninManagerFactory::SigninManagerFactory() | 18 SigninManagerFactory::SigninManagerFactory() |
19 : BrowserContextKeyedServiceFactory( | 19 : BrowserContextKeyedServiceFactory( |
20 "SigninManager", | 20 "SigninManager", |
21 BrowserContextDependencyManager::GetInstance()) { | 21 BrowserContextDependencyManager::GetInstance()) { |
22 DependsOn(ChromeSigninClientFactory::GetInstance()); | 22 DependsOn(ChromeSigninClientFactory::GetInstance()); |
23 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 23 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
24 } | 24 } |
25 | 25 |
26 SigninManagerFactory::~SigninManagerFactory() { | 26 SigninManagerFactory::~SigninManagerFactory() { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 139 } |
140 | 140 |
141 void SigninManagerFactory::BrowserContextShutdown( | 141 void SigninManagerFactory::BrowserContextShutdown( |
142 content::BrowserContext* context) { | 142 content::BrowserContext* context) { |
143 SigninManagerBase* manager = static_cast<SigninManagerBase*>( | 143 SigninManagerBase* manager = static_cast<SigninManagerBase*>( |
144 GetServiceForBrowserContext(context, false)); | 144 GetServiceForBrowserContext(context, false)); |
145 if (manager) | 145 if (manager) |
146 FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerShutdown(manager)); | 146 FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerShutdown(manager)); |
147 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context); | 147 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context); |
148 } | 148 } |
OLD | NEW |