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

Unified Diff: chrome/browser/managed_mode/managed_mode_interstitial.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/managed_mode/managed_mode_interstitial.cc
diff --git a/chrome/browser/managed_mode/managed_mode_interstitial.cc b/chrome/browser/managed_mode/managed_mode_interstitial.cc
index 75dad74f28e6ef8d6a44a6301138f31250ddff08..130c03a22eb251eafd833780c1f5b0bfe650eb57 100644
--- a/chrome/browser/managed_mode/managed_mode_interstitial.cc
+++ b/chrome/browser/managed_mode/managed_mode_interstitial.cc
@@ -11,6 +11,7 @@
#include "base/values.h"
#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_delegate.h"
+#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/managed_mode/managed_user_service.h"
#include "chrome/browser/managed_mode/managed_user_service_factory.h"
@@ -52,6 +53,7 @@ ManagedModeInterstitial::ManagedModeInterstitial(
InfoBarService* service = InfoBarService::FromWebContents(web_contents);
if (service) {
+ InfoBarManager* infobar_manager = service->infobar_manager();
// Remove all the infobars which are attached to |web_contents| and for
// which ShouldExpire() returns true.
content::LoadCommittedDetails details;
@@ -67,9 +69,9 @@ ManagedModeInterstitial::ManagedModeInterstitial(
details.previous_url = controller.GetLastCommittedEntry()->GetURL();
}
details.type = content::NAVIGATION_TYPE_NEW_PAGE;
- for (int i = service->infobar_count() - 1; i >= 0; --i) {
- if (service->infobar_at(i)->delegate()->ShouldExpire(details))
- service->RemoveInfoBar(service->infobar_at(i));
+ for (int i = infobar_manager->infobar_count() - 1; i >= 0; --i) {
+ if (infobar_manager->infobar_at(i)->delegate()->ShouldExpire(details))
+ infobar_manager->RemoveInfoBar(infobar_manager->infobar_at(i));
}
}

Powered by Google App Engine
This is Rietveld 408576698