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 b6bd5833ca84001a409a85ed8a99375ed54ae918..66ba670815c2ebdd43f6e9306768660914d1eeba 100644 |
--- a/components/enhanced_bookmarks/bookmark_server_service.cc |
+++ b/components/enhanced_bookmarks/bookmark_server_service.cc |
@@ -71,8 +71,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(); |
@@ -81,7 +80,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); |
} |
// |