Chromium Code Reviews| 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 0cde6b00b51d9bba15648676c8455199e1e771fd..685217523982f37e1ccc25e06f477f93cdb1880d 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 |
| @@ -198,8 +198,9 @@ void ArcAppDeferredLauncherController::RegisterDeferredLaunch( |
| const ash::ShelfID shelf_id = owner_->GetShelfIDForAppID(shelf_app_id); |
| // We are allowed to apply new deferred controller only over shortcut. |
| - const ash::ShelfItem* item = owner_->GetItem(shelf_id); |
| - if (item && item->type != ash::TYPE_APP_SHORTCUT) |
| + const LauncherItemController* existing_controller = |
| + owner_->GetLauncherItemController(shelf_id); |
| + if (existing_controller && !existing_controller->IsShortcut()) |
|
msw
2017/03/14 01:24:59
Can you write an automated test that ensures this
khmel
2017/03/14 20:19:56
Done.
|
| return; |
| ArcAppDeferredLauncherItemController* controller = |