diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 20:55:52 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 20:55:52 +0000 |
commit | 1da85793720b802e7db55a6acdee94f528ef8b6a (patch) | |
tree | f43ec1091ff1c2ff3c601af99f833fb7f4e96841 /chrome/browser/browser.cc | |
parent | bdf5af139160f0e257ae6ed9effe87b68bb49632 (diff) | |
download | chromium_src-1da85793720b802e7db55a6acdee94f528ef8b6a.zip chromium_src-1da85793720b802e7db55a6acdee94f528ef8b6a.tar.gz chromium_src-1da85793720b802e7db55a6acdee94f528ef8b6a.tar.bz2 |
Close all tabs for an extension when disabling it.
BUG=53585
TEST=Open multiple tabs to a chrome-extension URL, then disable that extension. Tabs should close. See bug for details.
Review URL: http://codereview.chromium.org/3274012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index a87981a..9e3beea 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -3047,12 +3047,11 @@ void Browser::Observe(NotificationType type, // Close any tabs from the unloaded extension. Extension* extension = Details<Extension>(details).ptr(); - for (int i = 0; i < tabstrip_model_.count(); i++) { + for (int i = tabstrip_model_.count() - 1; i >= 0; --i) { TabContents* tc = tabstrip_model_.GetTabContentsAt(i); if (tc->GetURL().SchemeIs(chrome::kExtensionScheme) && tc->GetURL().host() == extension->id()) { CloseTabContents(tc); - return; } } |