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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 617183003: Make sure GetAuthenticatedAccountId() returns a canonicalized id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments 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/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 3acb432b78ff0bd4e2cc1a427717519bae521a6d..20f7f96f112fdd5062e50035880140732fd0cc26 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -282,8 +282,9 @@ bool ProfileSyncService::IsOAuthRefreshTokenAvailable() {
if (!oauth2_token_service_)
return false;
- return oauth2_token_service_->RefreshTokenIsAvailable(
- signin_->GetAccountIdToUse());
+ std::string account_id = signin_->GetAccountIdToUse();
+ return !account_id.empty() &&
+ oauth2_token_service_->RefreshTokenIsAvailable(account_id);
}
void ProfileSyncService::Initialize() {

Powered by Google App Engine
This is Rietveld 408576698