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

Unified Diff: chrome/browser/extensions/api/identity/account_tracker.cc

Issue 144013009: Extensions: 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/extensions/api/identity/account_tracker.cc
diff --git a/chrome/browser/extensions/api/identity/account_tracker.cc b/chrome/browser/extensions/api/identity/account_tracker.cc
index d5d80cead1e8b9b45a7278aeaeeaf925a7e47728..21b4534b655e6524940d9e05e9c0afe4de431d38 100644
--- a/chrome/browser/extensions/api/identity/account_tracker.cc
+++ b/chrome/browser/extensions/api/identity/account_tracker.cc
@@ -11,7 +11,8 @@
#include "chrome/browser/profiles/profile.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_base.h"
+#include "chrome/browser/signin/signin_manager.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "content/public/browser/notification_details.h"
#include "extensions/browser/extension_system.h"
@@ -52,9 +53,9 @@ void AccountTracker::RemoveObserver(Observer* observer) {
void AccountTracker::OnRefreshTokenAvailable(const std::string& account_id) {
// Ignore refresh tokens if there is no primary account ID at all.
- ProfileOAuth2TokenService* token_service =
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
- if (token_service->GetPrimaryAccountId().empty())
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile_);
+ if (signin_manager->GetAuthenticatedAccountId().empty())
return;
DVLOG(1) << "AVAILABLE " << account_id;

Powered by Google App Engine
This is Rietveld 408576698