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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/signin/account_tracker_service_factory.h" | 9 #include "chrome/browser/signin/account_tracker_service_factory.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/gaia_cookie_manager_service_factory.h" |
11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
12 #include "chrome/browser/signin/signin_error_controller_factory.h" | 13 #include "chrome/browser/signin/signin_error_controller_factory.h" |
13 #include "chrome/browser/signin/signin_manager_factory.h" | 14 #include "chrome/browser/signin/signin_manager_factory.h" |
14 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 16 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
16 #include "components/pref_registry/pref_registry_syncable.h" | 17 #include "components/pref_registry/pref_registry_syncable.h" |
17 #include "components/signin/core/browser/about_signin_internals.h" | 18 #include "components/signin/core/browser/about_signin_internals.h" |
18 #include "components/signin/core/browser/signin_internals_util.h" | 19 #include "components/signin/core/browser/signin_internals_util.h" |
19 #include "components/signin/core/browser/signin_manager.h" | 20 #include "components/signin/core/browser/signin_manager.h" |
20 #include "google_apis/gaia/gaia_constants.h" | 21 #include "google_apis/gaia/gaia_constants.h" |
21 | 22 |
22 using namespace signin_internals_util; | 23 using namespace signin_internals_util; |
23 | 24 |
24 AboutSigninInternalsFactory::AboutSigninInternalsFactory() | 25 AboutSigninInternalsFactory::AboutSigninInternalsFactory() |
25 : BrowserContextKeyedServiceFactory( | 26 : BrowserContextKeyedServiceFactory( |
26 "AboutSigninInternals", | 27 "AboutSigninInternals", |
27 BrowserContextDependencyManager::GetInstance()) { | 28 BrowserContextDependencyManager::GetInstance()) { |
28 DependsOn(AccountTrackerServiceFactory::GetInstance()); | 29 DependsOn(AccountTrackerServiceFactory::GetInstance()); |
29 DependsOn(ChromeSigninClientFactory::GetInstance()); | 30 DependsOn(ChromeSigninClientFactory::GetInstance()); |
| 31 DependsOn(GaiaCookieManagerServiceFactory::GetInstance()); |
30 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 32 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
31 DependsOn(SigninErrorControllerFactory::GetInstance()); | 33 DependsOn(SigninErrorControllerFactory::GetInstance()); |
32 DependsOn(SigninManagerFactory::GetInstance()); | 34 DependsOn(SigninManagerFactory::GetInstance()); |
33 } | 35 } |
34 | 36 |
35 AboutSigninInternalsFactory::~AboutSigninInternalsFactory() {} | 37 AboutSigninInternalsFactory::~AboutSigninInternalsFactory() {} |
36 | 38 |
37 // static | 39 // static |
38 AboutSigninInternals* AboutSigninInternalsFactory::GetForProfile( | 40 AboutSigninInternals* AboutSigninInternalsFactory::GetForProfile( |
39 Profile* profile) { | 41 Profile* profile) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 80 } |
79 } | 81 } |
80 | 82 |
81 KeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( | 83 KeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( |
82 content::BrowserContext* context) const { | 84 content::BrowserContext* context) const { |
83 Profile* profile = Profile::FromBrowserContext(context); | 85 Profile* profile = Profile::FromBrowserContext(context); |
84 AboutSigninInternals* service = new AboutSigninInternals( | 86 AboutSigninInternals* service = new AboutSigninInternals( |
85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 87 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
86 AccountTrackerServiceFactory::GetForProfile(profile), | 88 AccountTrackerServiceFactory::GetForProfile(profile), |
87 SigninManagerFactory::GetForProfile(profile), | 89 SigninManagerFactory::GetForProfile(profile), |
88 SigninErrorControllerFactory::GetForProfile(profile)); | 90 SigninErrorControllerFactory::GetForProfile(profile), |
| 91 GaiaCookieManagerServiceFactory::GetForProfile(profile)); |
89 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile)); | 92 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile)); |
90 return service; | 93 return service; |
91 } | 94 } |
OLD | NEW |