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

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

Issue 2487953003: Remove LauncherItemController::IsOpen, check ShelfItem::status. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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
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 95943445369070db96873fdf4d94058ea2fe7de6..580c7b09027b8ca561731a2e555435b69f5de81a 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
@@ -460,10 +460,8 @@ void ChromeLauncherControllerImpl::Close(ash::ShelfID id) {
}
bool ChromeLauncherControllerImpl::IsOpen(ash::ShelfID id) {
- LauncherItemController* controller = GetLauncherItemController(id);
- if (!controller)
- return false;
- return controller->IsOpen();
+ const int index = model_->ItemIndexByID(id);
+ return index >= 0 && model_->items()[index].status != ash::STATUS_CLOSED;
}
bool ChromeLauncherControllerImpl::IsPlatformApp(ash::ShelfID id) {

Powered by Google App Engine
This is Rietveld 408576698