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

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

Issue 2051503002: Fix restore windows chrome icon has no running status bar on shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using c++11 range iterator Created 4 years, 6 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/chrome_launcher_controller_unittest.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 bd4c39734264403f68ea464a21c9e51614125aba..2261e3143e853392f8d06a4b6974ee1b0e73db2d 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
@@ -102,14 +102,11 @@ void BrowserShortcutLauncherItemController::UpdateBrowserItemState() {
}
if (browser_status == ash::STATUS_CLOSED) {
- const BrowserList* browser_list = BrowserList::GetInstance();
- for (BrowserList::const_reverse_iterator it =
- browser_list->begin_last_active();
- it != browser_list->end_last_active() &&
- browser_status == ash::STATUS_CLOSED;
- ++it) {
- if (IsBrowserRepresentedInBrowserList(*it))
+ for (auto* browser : *BrowserList::GetInstance()) {
+ if (IsBrowserRepresentedInBrowserList(browser)) {
browser_status = ash::STATUS_RUNNING;
+ break;
+ }
}
}
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698