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 3ae87b3ac2fec19a499f8e2731ef0568a5583cfd..5df442ef07803e78912f0b24e574e3290faf2270 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 |
@@ -9,6 +9,7 @@ |
#include "base/android/jni_string.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/infobars/infobar.h" |
+#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" |
#include "chrome/browser/ui/auto_login_infobar_delegate.h" |
#include "content/public/browser/web_contents.h" |
@@ -105,8 +106,11 @@ 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()); |
+ DCHECK(infobar_service); |
SimpleAlertInfoBarDelegate::Create( |
- infobar()->owner(), IDR_INFOBAR_WARNING, |
+ infobar_service, IDR_INFOBAR_WARNING, |
l10n_util::GetStringUTF16(IDS_AUTO_LOGIN_FAILED), false); |
infobar()->RemoveSelf(); |
} |