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

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: update Created 5 years, 3 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 // static 44 // static
45 ProfileOAuth2TokenServiceFactory* 45 ProfileOAuth2TokenServiceFactory*
46 ProfileOAuth2TokenServiceFactory::GetInstance() { 46 ProfileOAuth2TokenServiceFactory::GetInstance() {
47 return base::Singleton<ProfileOAuth2TokenServiceFactory>::get(); 47 return base::Singleton<ProfileOAuth2TokenServiceFactory>::get();
48 } 48 }
49 49
50 KeyedService* ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor( 50 KeyedService* ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor(
51 content::BrowserContext* context) const { 51 content::BrowserContext* context) const {
52 Profile* profile = static_cast<Profile*>(context);
52 #if defined(OS_ANDROID) 53 #if defined(OS_ANDROID)
53 OAuth2TokenServiceDelegateAndroid* delegate = 54 OAuth2TokenServiceDelegateAndroid* delegate =
54 new OAuth2TokenServiceDelegateAndroid(); 55 new OAuth2TokenServiceDelegateAndroid(
55 delegate->Initialize(); 56 AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile));
56 #else 57 #else
57 Profile* profile = static_cast<Profile*>(context);
58 MutableProfileOAuth2TokenServiceDelegate* delegate = 58 MutableProfileOAuth2TokenServiceDelegate* delegate =
59 new MutableProfileOAuth2TokenServiceDelegate( 59 new MutableProfileOAuth2TokenServiceDelegate(
60 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile), 60 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
61 SigninErrorControllerFactory::GetInstance()->GetForProfile(profile), 61 SigninErrorControllerFactory::GetInstance()->GetForProfile(profile),
62 AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile)); 62 AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile));
63 #endif 63 #endif
64 ProfileOAuth2TokenService* service = new ProfileOAuth2TokenService(delegate); 64 ProfileOAuth2TokenService* service = new ProfileOAuth2TokenService(delegate);
65 return service; 65 return service;
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/oauth2_token_service_delegate_android.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698