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

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 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: google_apis/drive/auth_service.cc
diff --git a/google_apis/drive/auth_service.cc b/google_apis/drive/auth_service.cc
index 82fc529df5d7f683e1db34990307ab616a89d562..7c7d447b13cc4ff5626b1a1d7ba435a2441ba869 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