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 2d7bac1f1d27dc5fcd9c0f53f8ed6441c71dee53..31c4b75bb316e90ca96731f20d3c2ea924b9933c 100644 |
--- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc |
+++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc |
@@ -8,6 +8,8 @@ |
#include "base/strings/string_split.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
+#include "chrome/browser/signin/profile_oauth2_token_service.h" |
+#include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
#include "google_apis/gaia/gaia_urls.h" |
#include "net/base/escape.h" |
@@ -54,8 +56,10 @@ GaiaWebAuthFlow::~GaiaWebAuthFlow() { |
} |
void GaiaWebAuthFlow::Start() { |
+ ProfileOAuth2TokenService* token_service = |
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); |
ubertoken_fetcher_.reset(new UbertokenFetcher(profile_, this)); |
- ubertoken_fetcher_->StartFetchingToken(); |
+ ubertoken_fetcher_->StartFetchingToken(token_service->GetPrimaryAccountId()); |
} |
void GaiaWebAuthFlow::OnUbertokenSuccess(const std::string& token) { |