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

Unified Diff: chrome/browser/managed_mode/managed_mode_interstitial.cc

Issue 190063006: Infobar Componentization Proof of Concept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes 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..2871a846de319b9f6193af019eada5a63a8ab041 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"
@@ -67,9 +68,12 @@ 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));
+ InfoBarManager& manager = service->infobar_manager();
+ for (int i = manager.infobar_count() - 1; i >= 0; --i) {
+ if (manager.infobar_at(i)->delegate()->ShouldExpire(
+ InfoBarService::NavigationDetailsFromLoadCommittedDetails(
+ details)))
+ manager.RemoveInfoBar(manager.infobar_at(i));
}
}

Powered by Google App Engine
This is Rietveld 408576698