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

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

Issue 2953253002: [DICE] Enable sync for an account that is already present in the token service. (Closed)
Patch Set: Prepare for review Created 3 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 c2d759363d652df5bdfa39ac19cc60d703dbed67..e9bc7433543b1235acd45896c489c1eb2ef1d7ae 100644
--- a/chrome/browser/android/signin/signin_manager_android.cc
+++ b/chrome/browser/android/signin/signin_manager_android.cc
@@ -115,10 +115,11 @@ void SigninManagerAndroid::CheckPolicyBeforeSignIn(
username_ = base::android::ConvertJavaStringToUTF8(env, username);
policy::UserPolicySigninService* service =
policy::UserPolicySigninServiceFactory::GetForProfile(profile_);
- service->RegisterForPolicy(
- username_, AccountTrackerServiceFactory::GetForProfile(profile_)
- ->FindAccountInfoByEmail(username_)
- .account_id,
+ service->RegisterForPolicyWithAccountId(
+ username_,
+ AccountTrackerServiceFactory::GetForProfile(profile_)
+ ->FindAccountInfoByEmail(username_)
+ .account_id,
base::Bind(&SigninManagerAndroid::OnPolicyRegisterDone,
weak_factory_.GetWeakPtr()));
}
@@ -342,10 +343,11 @@ static void IsUserManaged(
base::android::ConvertJavaStringToUTF8(env, j_username);
policy::UserPolicySigninService* service =
policy::UserPolicySigninServiceFactory::GetForProfile(profile);
- service->RegisterForPolicy(
- username, AccountTrackerServiceFactory::GetForProfile(profile)
- ->FindAccountInfoByEmail(username)
- .account_id,
+ service->RegisterForPolicyWithAccountId(
+ username,
+ AccountTrackerServiceFactory::GetForProfile(profile)
+ ->FindAccountInfoByEmail(username)
+ .account_id,
base::Bind(&UserManagementDomainFetched, callback));
}

Powered by Google App Engine
This is Rietveld 408576698