summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/browser.cc')
-rw-r--r--chrome/browser/ui/browser.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index f46ee08..81fb6db 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3284,19 +3284,16 @@ void Browser::Observe(NotificationType type,
// this extension, it means that it has been reloaded in another window
// so just remove the remaining CrashedExtensionInfoBarDelegate objects.
const Extension* extension = Details<const Extension>(details).ptr();
- CrashedExtensionInfoBarDelegate* delegate = NULL;
TabStripModel* model = tab_handler_->GetTabStripModel();
for (int m = 0; m < model->count(); ++m) {
TabContents* tab_contents = model->GetTabContentsAt(m)->tab_contents();
- for (int i = 0; i < tab_contents->infobar_delegate_count();) {
- delegate = tab_contents->GetInfoBarDelegateAt(i)->
- AsCrashedExtensionInfoBarDelegate();
- if (delegate && delegate->extension_id() == extension->id()) {
+ for (int i = 0; i < tab_contents->infobar_delegate_count(); ) {
+ CrashedExtensionInfoBarDelegate* delegate = tab_contents->
+ GetInfoBarDelegateAt(i)->AsCrashedExtensionInfoBarDelegate();
+ if (delegate && delegate->extension_id() == extension->id())
tab_contents->RemoveInfoBar(delegate);
- continue;
- }
- // Only increment |i| if we didn't remove an entry.
- ++i;
+ else
+ ++i;
}
}
break;