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

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

Issue 23455037: Makes BrowserStatusMonitor remove observers in destructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK Created 7 years, 3 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 | chrome/browser/ui/ash/launcher/browser_status_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
index 706356e815c5371586000d630f488ff36136b456..5e1e8c59e9b7bd53f8854a28e92e6eb6d583554b 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
@@ -272,7 +272,7 @@ void BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
items.push_back(*it);
}
// If there are no suitable browsers we create a new one.
- if (!items.size()) {
+ if (items.empty()) {
launcher_controller()->CreateNewWindow();
return;
}
@@ -288,8 +288,8 @@ void BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
browser = items[0];
} else {
// If there is more then one suitable browser, we advance to the next if
- // |current_browser| is already active - or - check the last used browser
- // if it can be used.
+ // |browser| is already active - or - check the last used browser if it can
+ // be used.
std::vector<Browser*>::iterator i =
std::find(items.begin(), items.end(), browser);
if (i != items.end()) {
@@ -311,6 +311,7 @@ void BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
bool BrowserShortcutLauncherItemController::IsBrowserRepresentedInBrowserList(
Browser* browser) {
return (browser &&
+ browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH &&
(browser->is_type_tabbed() ||
!browser->is_app() ||
!browser->is_type_popup() ||
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/browser_status_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698