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

Unified Diff: components/enhanced_bookmarks/bookmark_server_service.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: components/enhanced_bookmarks/bookmark_server_service.cc
diff --git a/components/enhanced_bookmarks/bookmark_server_service.cc b/components/enhanced_bookmarks/bookmark_server_service.cc
index 08217a2bcd55def00c9e35d9b48dc930603bcc8f..1e6f4b0f102b0da8db7cd5c8de378678a2b0dcf3 100644
--- a/components/enhanced_bookmarks/bookmark_server_service.cc
+++ b/components/enhanced_bookmarks/bookmark_server_service.cc
@@ -67,8 +67,7 @@ void BookmarkServerService::TriggerTokenRequest(bool cancel_previous) {
if (token_request_ || url_fetcher_)
return; // Fetcher is already running.
- const std::string username(signin_manager_->GetAuthenticatedUsername());
- if (!username.length()) {
+ if (!signin_manager_->IsAuthenticated()) {
// User is not signed in.
CleanAfterFailure();
Notify();
@@ -77,7 +76,8 @@ void BookmarkServerService::TriggerTokenRequest(bool cancel_previous) {
// Find a token.
OAuth2TokenService::ScopeSet scopes;
scopes.insert(GaiaConstants::kChromeSyncOAuth2Scope);
- token_request_ = token_service_->StartRequest(username, scopes, this);
+ token_request_ = token_service_->StartRequest(
+ signin_manager_->GetAuthenticatedAccountId(), scopes, this);
}
//

Powered by Google App Engine
This is Rietveld 408576698