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

Side by Side Diff: chrome/browser/ui/auto_login_infobar_delegate.cc

Issue 601643002: Use a distinct source parameter on gaia endpoints for the reconcilor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uber
Patch Set: rebased Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/auto_login_infobar_delegate.h" 5 #include "chrome/browser/ui/auto_login_infobar_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 : content::WebContentsObserver(web_contents), 80 : content::WebContentsObserver(web_contents),
81 args_(args) { 81 args_(args) {
82 Profile* profile = 82 Profile* profile =
83 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 83 Profile::FromBrowserContext(web_contents->GetBrowserContext());
84 ProfileOAuth2TokenService* token_service = 84 ProfileOAuth2TokenService* token_service =
85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); 85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
86 SigninManagerBase* signin_manager = 86 SigninManagerBase* signin_manager =
87 SigninManagerFactory::GetInstance()->GetForProfile(profile); 87 SigninManagerFactory::GetInstance()->GetForProfile(profile);
88 ubertoken_fetcher_.reset(new UbertokenFetcher(token_service, 88 ubertoken_fetcher_.reset(new UbertokenFetcher(token_service,
89 this, 89 this,
90 GaiaConstants::kChromeSource,
90 profile->GetRequestContext())); 91 profile->GetRequestContext()));
91 ubertoken_fetcher_->StartFetchingToken( 92 ubertoken_fetcher_->StartFetchingToken(
92 signin_manager->GetAuthenticatedAccountId()); 93 signin_manager->GetAuthenticatedAccountId());
93 } 94 }
94 95
95 AutoLoginRedirector::~AutoLoginRedirector() { 96 AutoLoginRedirector::~AutoLoginRedirector() {
96 } 97 }
97 98
98 void AutoLoginRedirector::WebContentsDestroyed() { 99 void AutoLoginRedirector::WebContentsDestroyed() {
99 // The WebContents that started this has been destroyed. The request must be 100 // The WebContents that started this has been destroyed. The request must be
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 RecordHistogramAction(REJECTED); 231 RecordHistogramAction(REJECTED);
231 button_pressed_ = true; 232 button_pressed_ = true;
232 return true; 233 return true;
233 } 234 }
234 235
235 void AutoLoginInfoBarDelegate::GoogleSignedOut( 236 void AutoLoginInfoBarDelegate::GoogleSignedOut(
236 const std::string& account_id, 237 const std::string& account_id,
237 const std::string& username) { 238 const std::string& username) {
238 infobar()->RemoveSelf(); 239 infobar()->RemoveSelf();
239 } 240 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698