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

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

Issue 211273007: Split InfoBarService core code into InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + comments Created 6 years, 9 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 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();
}

Powered by Google App Engine
This is Rietveld 408576698