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

Unified Diff: chrome/browser/ui/auto_login_infobar_delegate.cc

Issue 131973004: Eliminate usage of PO2TS::GetPrimaryAccountID() in UbertokenFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile failure Created 6 years, 11 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/signin/ubertoken_fetcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/auto_login_infobar_delegate.cc
diff --git a/chrome/browser/ui/auto_login_infobar_delegate.cc b/chrome/browser/ui/auto_login_infobar_delegate.cc
index 45b442dcf174509f544247c9695c05e84e11d69c..5837e616e6a9e3e90005e5a6e510d70d5649e203 100644
--- a/chrome/browser/ui/auto_login_infobar_delegate.cc
+++ b/chrome/browser/ui/auto_login_infobar_delegate.cc
@@ -16,6 +16,8 @@
#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#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/ubertoken_fetcher.h"
#include "chrome/browser/ui/sync/sync_promo_ui.h"
#include "chrome/common/chrome_switches.h"
@@ -84,9 +86,12 @@ AutoLoginRedirector::AutoLoginRedirector(
const std::string& args)
: content::WebContentsObserver(web_contents),
args_(args) {
- ubertoken_fetcher_.reset(new UbertokenFetcher(
- Profile::FromBrowserContext(web_contents->GetBrowserContext()), this));
- ubertoken_fetcher_->StartFetchingToken();
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ ProfileOAuth2TokenService* token_service =
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
+ ubertoken_fetcher_.reset(new UbertokenFetcher(profile, this));
+ ubertoken_fetcher_->StartFetchingToken(token_service->GetPrimaryAccountId());
}
AutoLoginRedirector::~AutoLoginRedirector() {
« no previous file with comments | « chrome/browser/signin/ubertoken_fetcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698