| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/account_reconcilor_factory.h" | 5 #include "chrome/browser/signin/account_reconcilor_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 8 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
| 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 10 #include "chrome/browser/signin/signin_manager_factory.h" | 10 #include "chrome/browser/signin/signin_manager_factory.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // static | 31 // static |
| 32 AccountReconcilorFactory* AccountReconcilorFactory::GetInstance() { | 32 AccountReconcilorFactory* AccountReconcilorFactory::GetInstance() { |
| 33 return Singleton<AccountReconcilorFactory>::get(); | 33 return Singleton<AccountReconcilorFactory>::get(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 KeyedService* AccountReconcilorFactory::BuildServiceInstanceFor( | 36 KeyedService* AccountReconcilorFactory::BuildServiceInstanceFor( |
| 37 content::BrowserContext* context) const { | 37 content::BrowserContext* context) const { |
| 38 Profile* profile = Profile::FromBrowserContext(context); | 38 Profile* profile = Profile::FromBrowserContext(context); |
| 39 AccountReconcilor* reconcilor = new AccountReconcilor( | 39 AccountReconcilor* reconcilor = new AccountReconcilor( |
| 40 profile, ChromeSigninClientFactory::GetForProfile(profile)); | 40 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| 41 SigninManagerFactory::GetForProfile(profile), |
| 42 ChromeSigninClientFactory::GetForProfile(profile)); |
| 41 reconcilor->Initialize(true /* start_reconcile_if_tokens_available */); | 43 reconcilor->Initialize(true /* start_reconcile_if_tokens_available */); |
| 42 return reconcilor; | 44 return reconcilor; |
| 43 } | 45 } |
| 44 | 46 |
| 45 void AccountReconcilorFactory::RegisterProfilePrefs( | 47 void AccountReconcilorFactory::RegisterProfilePrefs( |
| 46 user_prefs::PrefRegistrySyncable* registry) { | 48 user_prefs::PrefRegistrySyncable* registry) { |
| 47 } | 49 } |
| OLD | NEW |