Index: chrome/browser/history/web_history_service.cc |
diff --git a/chrome/browser/history/web_history_service.cc b/chrome/browser/history/web_history_service.cc |
index 3def0b69ca2f3684e98038072bb04467713e2659..38167137c0e5c2f6a989b7a0e444a8f92b960a03 100644 |
--- a/chrome/browser/history/web_history_service.cc |
+++ b/chrome/browser/history/web_history_service.cc |
@@ -81,7 +81,8 @@ class RequestImpl : public WebHistoryService::Request, |
ProfileOAuth2TokenService* token_service = |
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); |
- token_request_ = token_service->StartRequest(oauth_scopes, this); |
+ token_request_ = token_service->StartRequest( |
+ token_service->GetPrimaryAccountId(), oauth_scopes, this); |
is_pending_ = true; |
} |
@@ -99,10 +100,13 @@ class RequestImpl : public WebHistoryService::Request, |
if (response_code_ == net::HTTP_UNAUTHORIZED && ++auth_retry_count_ <= 1) { |
OAuth2TokenService::ScopeSet oauth_scopes; |
oauth_scopes.insert(kHistoryOAuthScope); |
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) |
- ->InvalidateToken(oauth_scopes, access_token_); |
+ ProfileOAuth2TokenService* token_service = |
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); |
+ token_service->InvalidateToken(token_service->GetPrimaryAccountId(), |
+ oauth_scopes, |
+ access_token_); |
- access_token_ = std::string(); |
+ access_token_.clear(); |
Start(); |
return; |
} |