| Index: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
|
| index 7524f30c2d34bf140b4ea7a8c5599d8338cf2e98..e74ed8855e6890b282c0131e7ecdf814d37f0f69 100644
|
| --- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
|
| +++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
|
| @@ -47,14 +47,15 @@ ChromeLauncherAppMenuItems
|
| ArcAppWindowLauncherItemController::GetApplicationList(int event_flags) {
|
| ChromeLauncherAppMenuItems items =
|
| AppWindowLauncherItemController::GetApplicationList(event_flags);
|
| - size_t i = 0;
|
| - for (auto it = windows().begin(); it != windows().end(); ++it, ++i) {
|
| + for (auto it = windows().begin(); it != windows().end(); ++it) {
|
| // TODO(khmel): resolve correct icon here.
|
| + size_t i = std::distance(windows().begin(), it);
|
| gfx::Image image;
|
| aura::Window* window = (*it)->GetNativeWindow();
|
| items.push_back(new ChromeLauncherAppMenuItemV2App(
|
| - (window ? window->title() : GetTitle()), &image, app_id(),
|
| - launcher_controller(), i, i == 0 /* has_leading_separator */));
|
| + ((window && !window->title().empty()) ? window->title() : GetTitle()),
|
| + &image, app_id(), launcher_controller(), i,
|
| + i == 0 /* has_leading_separator */));
|
| }
|
| return items;
|
| }
|
|
|