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

Unified Diff: chrome/browser/extensions/api/identity/gaia_web_auth_flow.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/gaia_web_auth_flow.cc
diff --git a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
index 2c63a19a53caea5a82f76fbf91ce771dd3f6f46d..36c78b43df17b118e8c2f47ded7ea00a974c21d6 100644
--- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
+++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
@@ -11,6 +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.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/escape.h"
@@ -62,7 +64,10 @@ void GaiaWebAuthFlow::Start() {
ubertoken_fetcher_.reset(new UbertokenFetcher(token_service,
this,
profile_->GetRequestContext()));
- ubertoken_fetcher_->StartFetchingToken(token_service->GetPrimaryAccountId());
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile_);
+ ubertoken_fetcher_->StartFetchingToken(
+ signin_manager->GetAuthenticatedAccountId());
}
void GaiaWebAuthFlow::OnUbertokenSuccess(const std::string& token) {

Powered by Google App Engine
This is Rietveld 408576698