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

Unified Diff: chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile 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/android/infobars/auto_login_infobar_delegate_android.cc
diff --git a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc
index 5df442ef07803e78912f0b24e574e3290faf2270..b52018b10a9c89378eab9ebc7507592aca28d61b 100644
--- a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc
+++ b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc
@@ -89,7 +89,8 @@ void AutoLoginInfoBarDelegateAndroid::LoginSuccess(JNIEnv* env,
// TODO(miguelg): Test whether the Stop() and RemoveInfoBar() calls here are
// necessary, or whether OpenURL() will do this for us.
- content::WebContents* contents = web_contents();
+ content::WebContents* contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
contents->Stop();
infobar()->RemoveSelf();
// WARNING: |this| may be deleted at this point! Do not access any members!
@@ -106,8 +107,8 @@ void AutoLoginInfoBarDelegateAndroid::LoginFailed(JNIEnv* env, jobject obj) {
// TODO(miguelg): Using SimpleAlertInfoBarDelegate::Create() animates in a new
// infobar while we animate the current one closed. It would be better to use
// ReplaceInfoBar().
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(web_contents());
+ InfoBarService* infobar_service = InfoBarService::FromWebContents(
+ InfoBarService::WebContentsFromInfoBar(infobar()));
DCHECK(infobar_service);
SimpleAlertInfoBarDelegate::Create(
infobar_service, IDR_INFOBAR_WARNING,

Powered by Google App Engine
This is Rietveld 408576698