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

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 Hui's comments, fix cvox tests 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 d726545a168ff29ff508b4abda7781604ba08716..0519109147b0cb0bd6e4fa72df907aed09292d2b 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