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

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

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/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 6e5bb747076f3664be80e700029686d12b93c704..523676a431739529ac5d52e121ae5b15fad970e1 100644
--- a/chrome/browser/ui/auto_login_infobar_delegate.cc
+++ b/chrome/browser/ui/auto_login_infobar_delegate.cc
@@ -210,15 +210,19 @@ base::string16 AutoLoginInfoBarDelegate::GetButtonLabel(
bool AutoLoginInfoBarDelegate::Accept() {
// AutoLoginRedirector deletes itself.
- new AutoLoginRedirector(web_contents(), params_.header.args);
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ new AutoLoginRedirector(web_contents, params_.header.args);
RecordHistogramAction(ACCEPTED);
button_pressed_ = true;
return true;
}
bool AutoLoginInfoBarDelegate::Cancel() {
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
PrefService* pref_service = Profile::FromBrowserContext(
- web_contents()->GetBrowserContext())->GetPrefs();
+ web_contents->GetBrowserContext())->GetPrefs();
pref_service->SetBoolean(prefs::kAutologinEnabled, false);
RecordHistogramAction(REJECTED);
button_pressed_ = true;

Powered by Google App Engine
This is Rietveld 408576698