Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: chrome/browser/signin/account_reconcilor_factory.cc

Issue 219933002: Componentize AccountReconcilor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ChromeOS fix Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/account_reconcilor_factory.h ('k') | chrome/browser/signin/account_reconcilor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698