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

Unified Diff: chrome/browser/android/signin/signin_manager_android.cc

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address final comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/signin/signin_manager_android.cc
diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/browser/android/signin/signin_manager_android.cc
index 42184c0f0c2067362d6ee5c295ea6817c296bf02..d11e1adb0b409483ae392245111f4f2d5091b0ea 100644
--- a/chrome/browser/android/signin/signin_manager_android.cc
+++ b/chrome/browser/android/signin/signin_manager_android.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/browsing_data/browsing_data_remover.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
-#include "chrome/browser/signin/android_profile_oauth2_token_service.h"
+#include "chrome/browser/signin/oauth2_token_service_delegate_android.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/common/pref_names.h"
@@ -265,13 +265,14 @@ void SigninManagerAndroid::ClearLastSignedInUser() {
void SigninManagerAndroid::LogInSignedInUser(JNIEnv* env, jobject obj) {
SigninManagerBase* signin_manager =
SigninManagerFactory::GetForProfile(profile_);
- // Just fire the events and let the Account Reconcilor handles everything.
- AndroidProfileOAuth2TokenService* token_service =
- ProfileOAuth2TokenServiceFactory::GetPlatformSpecificForProfile(
- profile_);
- const std::string& primary_acct =
- signin_manager->GetAuthenticatedAccountId();
- token_service->ValidateAccounts(primary_acct, true);
+ // With the account consistency enabled let the account Reconcilor handles
+ // everything.
+ ProfileOAuth2TokenService* token_service =
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
+ const std::string& primary_acct = signin_manager->GetAuthenticatedAccountId();
+
+ static_cast<OAuth2TokenServiceDelegateAndroid*>(token_service->GetDelegate())
+ ->ValidateAccounts(primary_acct, true);
}
jboolean SigninManagerAndroid::IsSigninAllowedByPolicy(JNIEnv* env,
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698