Chromium Code Reviews| Index: chrome/browser/extensions/extension_install_ui.cc |
| diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc |
| index d0b240d69ca7c932e24a64699f25e887ecb73ade..2b19f4a8cc070b62bc50085148ca6e6fd47dbc2f 100644 |
| --- a/chrome/browser/extensions/extension_install_ui.cc |
| +++ b/chrome/browser/extensions/extension_install_ui.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/utf_string_conversions.h" |
| #include "chrome/browser/extensions/extension_install_dialog.h" |
| #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" |
| +#include "chrome/browser/infobars/infobar_tab_helper.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/simple_message_box.h" |
| #include "chrome/browser/tabs/tab_strip_model.h" |
| @@ -264,8 +265,11 @@ void ExtensionInstallUI::ShowThemeInfoBar(const std::string& previous_theme_id, |
| // First find any previous theme preview infobars. |
| InfoBarDelegate* old_delegate = NULL; |
| - for (size_t i = 0; i < tab_contents->infobar_count(); ++i) { |
| - InfoBarDelegate* delegate = tab_contents->GetInfoBarDelegateAt(i); |
| + for (size_t i = 0; |
| + i < tab_contents->infobar_tab_helper()->infobar_count(); |
|
Peter Kasting
2011/08/31 18:47:32
Nit: Can you factor the infobar_tab_helper() out t
|
| + ++i) { |
| + InfoBarDelegate* delegate = |
| + tab_contents->infobar_tab_helper()->GetInfoBarDelegateAt(i); |
| ThemeInstalledInfoBarDelegate* theme_infobar = |
| delegate->AsThemePreviewInfobarDelegate(); |
| if (theme_infobar) { |
| @@ -285,9 +289,10 @@ void ExtensionInstallUI::ShowThemeInfoBar(const std::string& previous_theme_id, |
| previous_using_native_theme); |
| if (old_delegate) |
| - tab_contents->ReplaceInfoBar(old_delegate, new_delegate); |
| + tab_contents->infobar_tab_helper()->ReplaceInfoBar(old_delegate, |
| + new_delegate); |
| else |
| - tab_contents->AddInfoBar(new_delegate); |
| + tab_contents->infobar_tab_helper()->AddInfoBar(new_delegate); |
| } |
| void ExtensionInstallUI::ShowConfirmation(PromptType prompt_type) { |