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

Unified Diff: chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc

Issue 617183003: Make sure GetAuthenticatedAccountId() returns a canonicalized id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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/policy/cloud/user_policy_signin_service_mobile.cc
diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
index abd580e48b78d1bc9cbe6888c64b2230f827af82..e194f95d0b728991f513a861feb47f44891e608d 100644
--- a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
+++ b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
@@ -193,8 +193,7 @@ void UserPolicySigninService::RegisterCloudPolicyService() {
// If the user signed-out while this task was waiting then Shutdown() would
// have been called, which would have invalidated this task. Since we're here
// then the user must still be signed-in.
- const std::string& username = signin_manager()->GetAuthenticatedUsername();
- DCHECK(!username.empty());
+ DCHECK(signin_manager()->IsAuthenticated());
DCHECK(!policy_manager()->IsClientRegistered());
DCHECK(policy_manager()->core()->client());
@@ -207,7 +206,7 @@ void UserPolicySigninService::RegisterCloudPolicyService() {
GetRegistrationType()));
registration_helper_->StartRegistration(
oauth2_token_service_,
- username,
+ signin_manager()->GetAuthenticatedUsername(),
base::Bind(&UserPolicySigninService::OnRegistrationDone,
base::Unretained(this)));
}
« no previous file with comments | « chrome/browser/android/profiles/profile_downloader_android.cc ('k') | chrome/browser/services/gcm/fake_signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698