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

Unified Diff: chrome/browser/extensions/theme_installed_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/extensions/theme_installed_infobar_delegate.cc
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
index 986250e999d12d6e68d2e56b35683f60d844ee0e..68ef43610068680fdb902504ff94df624f492eb7 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_service.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/themes/theme_service.h"
@@ -47,6 +48,7 @@ void ThemeInstalledInfoBarDelegate::Create(
return;
InfoBarService* infobar_service =
InfoBarService::FromWebContents(web_contents);
+ InfoBarManager* infobar_manager = infobar_service->infobar_manager();
ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
scoped_ptr<InfoBar> new_infobar(ConfirmInfoBarDelegate::CreateInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new ThemeInstalledInfoBarDelegate(
@@ -55,8 +57,8 @@ void ThemeInstalledInfoBarDelegate::Create(
// If there's a previous theme infobar, just replace that instead of adding a
// new one.
- for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
- InfoBar* old_infobar = infobar_service->infobar_at(i);
+ for (size_t i = 0; i < infobar_manager->infobar_count(); ++i) {
+ InfoBar* old_infobar = infobar_manager->infobar_at(i);
ThemeInstalledInfoBarDelegate* theme_infobar =
old_infobar->delegate()->AsThemePreviewInfobarDelegate();
if (theme_infobar) {

Powered by Google App Engine
This is Rietveld 408576698