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

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

Issue 2545923004: Remove LauncherItemController::type; use ShelfItems::type. (Closed)
Patch Set: Update tests; fix test item running status. Created 4 years 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/arc_app_deferred_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
index 2bc17384b35a1956bee1997c9ae3377ea1f28f4a..8dd9ba8bd4ebcab8e687740777ac313a9be66be9 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
@@ -192,15 +192,9 @@ void ArcAppDeferredLauncherController::RegisterDeferredLaunch(
ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id);
const ash::ShelfID shelf_id = owner_->GetShelfIDForAppID(shelf_app_id);
- if (shelf_id) {
- LauncherItemController* controller =
- owner_->GetLauncherItemController(shelf_id);
- if (controller &&
- controller->type() != LauncherItemController::TYPE_SHORTCUT) {
- // We are allowed to apply new deferred controller only over shortcut.
- return;
- }
- }
+ // We are allowed to apply new deferred controller only over shortcut.
+ if (shelf_id && owner_->GetItem(shelf_id).type != ash::TYPE_APP_SHORTCUT)
+ return;
ArcAppDeferredLauncherItemController* controller =
new ArcAppDeferredLauncherItemController(shelf_app_id, owner_,

Powered by Google App Engine
This is Rietveld 408576698