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

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

Issue 1256283002: GAIA ID migration for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: full version Created 5 years, 4 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
OLDNEW
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/profile_oauth2_token_service_factory.h" 5 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/account_tracker_service_factory.h" 8 #include "chrome/browser/signin/account_tracker_service_factory.h"
9 #include "chrome/browser/signin/chrome_signin_client_factory.h" 9 #include "chrome/browser/signin/chrome_signin_client_factory.h"
10 #include "chrome/browser/signin/signin_error_controller_factory.h" 10 #include "chrome/browser/signin/signin_error_controller_factory.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 // static 42 // static
43 ProfileOAuth2TokenServiceFactory* 43 ProfileOAuth2TokenServiceFactory*
44 ProfileOAuth2TokenServiceFactory::GetInstance() { 44 ProfileOAuth2TokenServiceFactory::GetInstance() {
45 return Singleton<ProfileOAuth2TokenServiceFactory>::get(); 45 return Singleton<ProfileOAuth2TokenServiceFactory>::get();
46 } 46 }
47 47
48 KeyedService* ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor( 48 KeyedService* ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor(
49 content::BrowserContext* context) const { 49 content::BrowserContext* context) const {
50 Profile* profile = static_cast<Profile*>(context);
50 #if defined(OS_ANDROID) 51 #if defined(OS_ANDROID)
51 OAuth2TokenServiceDelegateAndroid* delegate = 52 OAuth2TokenServiceDelegateAndroid* delegate =
52 new OAuth2TokenServiceDelegateAndroid(); 53 new OAuth2TokenServiceDelegateAndroid();
53 delegate->Initialize(); 54 delegate->Initialize(
55 AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile));
Roger Tawa OOO till Jul 10th 2015/08/14 15:01:22 Please pass the ATS in the ctor of OAuth2TokenServ
gogerald1 2015/08/18 01:14:27 Done.
54 #else 56 #else
55 Profile* profile = static_cast<Profile*>(context);
56 MutableProfileOAuth2TokenServiceDelegate* delegate = 57 MutableProfileOAuth2TokenServiceDelegate* delegate =
57 new MutableProfileOAuth2TokenServiceDelegate( 58 new MutableProfileOAuth2TokenServiceDelegate(
58 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile), 59 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
59 SigninErrorControllerFactory::GetInstance()->GetForProfile(profile), 60 SigninErrorControllerFactory::GetInstance()->GetForProfile(profile),
60 AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile)); 61 AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile));
61 #endif 62 #endif
62 ProfileOAuth2TokenService* service = new ProfileOAuth2TokenService(delegate); 63 ProfileOAuth2TokenService* service = new ProfileOAuth2TokenService(delegate);
63 return service; 64 return service;
64 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698