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

Unified Diff: chrome/browser/history/web_history_service.cc

Issue 150003004: Replace PO2TS::GetPrimaryAccountId() with SMB::GetAuthenticatedAccountId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 10 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
« no previous file with comments | « chrome/browser/history/DEPS ('k') | chrome/browser/invalidation/ticl_invalidation_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8dfe959c72b8a4308353282f2f0b36c8f21a5350..12d13e10e41981d1889f1a1d76868a7aee46174f 100644
--- a/chrome/browser/history/web_history_service.cc
+++ b/chrome/browser/history/web_history_service.cc
@@ -13,6 +13,8 @@
#include "base/values.h"
#include "chrome/browser/signin/profile_oauth2_token_service.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
+#include "chrome/browser/signin/signin_manager.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "google_apis/gaia/gaia_urls.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_token_service.h"
@@ -82,8 +84,10 @@ class RequestImpl : public WebHistoryService::Request,
ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile_);
token_request_ = token_service->StartRequest(
- token_service->GetPrimaryAccountId(), oauth_scopes, this);
+ signin_manager->GetAuthenticatedAccountId(), oauth_scopes, this);
is_pending_ = true;
}
@@ -103,9 +107,12 @@ class RequestImpl : public WebHistoryService::Request,
oauth_scopes.insert(kHistoryOAuthScope);
ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
- token_service->InvalidateToken(token_service->GetPrimaryAccountId(),
- oauth_scopes,
- access_token_);
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile_);
+ token_service->InvalidateToken(
+ signin_manager->GetAuthenticatedAccountId(),
+ oauth_scopes,
+ access_token_);
access_token_.clear();
Start();
« no previous file with comments | « chrome/browser/history/DEPS ('k') | chrome/browser/invalidation/ticl_invalidation_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698