| 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 "chrome/browser/signin/cross_device_promo_factory.h" | 5 #include "chrome/browser/signin/cross_device_promo_factory.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | |
| 8 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 8 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
| 10 #include "chrome/browser/signin/cross_device_promo.h" | 9 #include "chrome/browser/signin/cross_device_promo.h" |
| 11 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" | 10 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
| 12 #include "chrome/browser/signin/signin_manager_factory.h" | 11 #include "chrome/browser/signin/signin_manager_factory.h" |
| 13 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 14 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 13 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 15 #include "components/pref_registry/pref_registry_syncable.h" | 14 #include "components/pref_registry/pref_registry_syncable.h" |
| 15 #include "components/prefs/pref_service.h" |
| 16 #include "components/signin/core/browser/signin_manager.h" | 16 #include "components/signin/core/browser/signin_manager.h" |
| 17 #include "components/syncable_prefs/pref_service_syncable.h" | 17 #include "components/syncable_prefs/pref_service_syncable.h" |
| 18 #include "google_apis/gaia/gaia_constants.h" | 18 #include "google_apis/gaia/gaia_constants.h" |
| 19 | 19 |
| 20 CrossDevicePromoFactory::CrossDevicePromoFactory() | 20 CrossDevicePromoFactory::CrossDevicePromoFactory() |
| 21 : BrowserContextKeyedServiceFactory( | 21 : BrowserContextKeyedServiceFactory( |
| 22 "CrossDevicePromo", | 22 "CrossDevicePromo", |
| 23 BrowserContextDependencyManager::GetInstance()) { | 23 BrowserContextDependencyManager::GetInstance()) { |
| 24 DependsOn(ChromeSigninClientFactory::GetInstance()); | 24 DependsOn(ChromeSigninClientFactory::GetInstance()); |
| 25 DependsOn(GaiaCookieManagerServiceFactory::GetInstance()); | 25 DependsOn(GaiaCookieManagerServiceFactory::GetInstance()); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 KeyedService* CrossDevicePromoFactory::BuildServiceInstanceFor( | 58 KeyedService* CrossDevicePromoFactory::BuildServiceInstanceFor( |
| 59 content::BrowserContext* context) const { | 59 content::BrowserContext* context) const { |
| 60 Profile* profile = Profile::FromBrowserContext(context); | 60 Profile* profile = Profile::FromBrowserContext(context); |
| 61 CrossDevicePromo* service = new CrossDevicePromo( | 61 CrossDevicePromo* service = new CrossDevicePromo( |
| 62 SigninManagerFactory::GetForProfile(profile), | 62 SigninManagerFactory::GetForProfile(profile), |
| 63 GaiaCookieManagerServiceFactory::GetForProfile(profile), | 63 GaiaCookieManagerServiceFactory::GetForProfile(profile), |
| 64 ChromeSigninClientFactory::GetForProfile(profile), profile->GetPrefs()); | 64 ChromeSigninClientFactory::GetForProfile(profile), profile->GetPrefs()); |
| 65 return service; | 65 return service; |
| 66 } | 66 } |
| OLD | NEW |