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

Unified Diff: google_apis/drive/auth_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: google_apis/drive/auth_service.cc
diff --git a/google_apis/drive/auth_service.cc b/google_apis/drive/auth_service.cc
index 49fe38adbbd2d647937c63df9d9c4c9dfde50900..b2a4ba6b4156342028be0c15f4868cfe2942da5b 100644
--- a/google_apis/drive/auth_service.cc
+++ b/google_apis/drive/auth_service.cc
@@ -130,8 +130,8 @@ AuthService::AuthService(
// Get OAuth2 refresh token (if we have any) and register for its updates.
oauth2_token_service_->AddObserver(this);
- has_refresh_token_ = oauth2_token_service_->RefreshTokenIsAvailable(
- account_id_);
+ has_refresh_token_ = !account_id_.empty() &&
+ oauth2_token_service_->RefreshTokenIsAvailable(account_id_);
}
AuthService::~AuthService() {

Powered by Google App Engine
This is Rietveld 408576698