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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2163443003: ash: CloseWindowedAppsFromRemovedExtension skips empty browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move empty tab strip check down Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
index 984adf5f1c8e7713da0083796c14afe348050a64..a59ff12ccac573ba90adc3b42d91f462d1036350 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
@@ -1487,7 +1487,7 @@ void ChromeLauncherControllerImpl::CloseWindowedAppsFromRemovedExtension(
const std::string& app_id,
const Profile* profile) {
// This function cannot rely on the controller's enumeration functionality
- // since the extension has already be unloaded.
+ // since the extension has already been unloaded.
const BrowserList* browser_list = BrowserList::GetInstance();
std::vector<Browser*> browser_to_close;
for (BrowserList::const_reverse_iterator it =
@@ -1504,7 +1504,8 @@ void ChromeLauncherControllerImpl::CloseWindowedAppsFromRemovedExtension(
}
while (!browser_to_close.empty()) {
TabStripModel* tab_strip = browser_to_close.back()->tab_strip_model();
- tab_strip->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE);
+ if (!tab_strip->empty())
+ tab_strip->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE);
browser_to_close.pop_back();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698