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

Unified Diff: chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.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/content_settings/popup_blocked_infobar_delegate.cc
diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
index 62a594066747d9cfc24a7b66cb7ca501f862bc94..ca2632dab669a10d62abc259d01932e7b918ea81 100644
--- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
+++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
@@ -7,6 +7,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/infobars/infobar.h"
+#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
@@ -28,21 +29,21 @@ void PopupBlockedInfoBarDelegate::Create(content::WebContents* web_contents,
new PopupBlockedInfoBarDelegate(
num_popups, url, profile->GetHostContentSettingsMap()))));
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(web_contents);
+ InfoBarManager* infobar_manager =
+ InfoBarService::FromWebContents(web_contents)->infobar_manager();
// See if there is an existing popup infobar already.
// TODO(dfalcantara) When triggering more than one popup the infobar
// will be shown once, then hide then be shown again.
// This will be fixed once we have an in place replace infobar mechanism.
- for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
- InfoBar* existing_infobar = infobar_service->infobar_at(i);
+ for (size_t i = 0; i < infobar_manager->infobar_count(); ++i) {
+ InfoBar* existing_infobar = infobar_manager->infobar_at(i);
if (existing_infobar->delegate()->AsPopupBlockedInfoBarDelegate()) {
- infobar_service->ReplaceInfoBar(existing_infobar, infobar.Pass());
+ infobar_manager->ReplaceInfoBar(existing_infobar, infobar.Pass());
return;
}
}
- infobar_service->AddInfoBar(infobar.Pass());
+ infobar_manager->AddInfoBar(infobar.Pass());
}
PopupBlockedInfoBarDelegate::~PopupBlockedInfoBarDelegate() {

Powered by Google App Engine
This is Rietveld 408576698