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

Unified Diff: chrome/browser/invalidation/ticl_invalidation_service.cc

Issue 165543004: Revert of Replace PO2TS::GetPrimaryAccountId() with SMB::GetAuthenticatedAccountId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/browser/invalidation/ticl_invalidation_service.cc
diff --git a/chrome/browser/invalidation/ticl_invalidation_service.cc b/chrome/browser/invalidation/ticl_invalidation_service.cc
index e83c8436d7219e896c176e97345ec740f37b571a..c30e689a03ca79770af717171138208d19a24b80 100644
--- a/chrome/browser/invalidation/ticl_invalidation_service.cc
+++ b/chrome/browser/invalidation/ticl_invalidation_service.cc
@@ -179,7 +179,7 @@
oauth2_scopes.insert(kOAuth2Scopes[i]);
// Invalidate previous token, otherwise token service will return the same
// token again.
- const std::string& account_id = signin_manager_->GetAuthenticatedAccountId();
+ const std::string& account_id = oauth2_token_service_->GetPrimaryAccountId();
oauth2_token_service_->InvalidateToken(account_id,
oauth2_scopes,
access_token_);
@@ -237,7 +237,7 @@
void TiclInvalidationService::OnRefreshTokenAvailable(
const std::string& account_id) {
- if (signin_manager_->GetAuthenticatedAccountId() == account_id) {
+ if (oauth2_token_service_->GetPrimaryAccountId() == account_id) {
if (!IsStarted() && IsReadyToStart()) {
StartInvalidator(PUSH_CLIENT_CHANNEL);
}
@@ -246,7 +246,7 @@
void TiclInvalidationService::OnRefreshTokenRevoked(
const std::string& account_id) {
- if (signin_manager_->GetAuthenticatedAccountId() == account_id) {
+ if (oauth2_token_service_->GetPrimaryAccountId() == account_id) {
access_token_.clear();
if (IsStarted()) {
UpdateInvalidatorCredentials();
@@ -312,7 +312,7 @@
}
if (!oauth2_token_service_->RefreshTokenIsAvailable(
- signin_manager_->GetAuthenticatedAccountId())) {
+ oauth2_token_service_->GetPrimaryAccountId())) {
DVLOG(2)
<< "Not starting TiclInvalidationServce: Waiting for refresh token.";
return false;
« no previous file with comments | « chrome/browser/history/web_history_service.cc ('k') | chrome/browser/managed_mode/managed_user_registration_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698