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

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

Issue 2870683002: ash: Remove ShelfModel id conversion functions. (Closed)
Patch Set: Address comments. Created 3 years, 7 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
Index: chrome/browser/ui/ash/launcher/launcher_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index 659fc4d397f197b3b6ce34f58502d90897c42e4b..e946dd44beed426485b6b68301a98259aa11d0ea 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -52,8 +52,7 @@ LauncherContextMenu* LauncherContextMenu::Create(
return new DesktopShellLauncherContextMenu(controller, item, wm_shelf);
// Create ArcLauncherContextMenu if the item is an ARC app.
- const std::string& app_id = controller->GetAppIDForShelfID(item->id);
- if (arc::IsArcItem(controller->profile(), app_id))
+ if (arc::IsArcItem(controller->profile(), item->id.app_id))
return new ArcLauncherContextMenu(controller, item, wm_shelf);
// Create ExtensionLauncherContextMenu for the item.
@@ -152,8 +151,7 @@ void LauncherContextMenu::AddPinMenu() {
// Expect a valid ShelfID to add pin/unpin menu item.
DCHECK(!item_.id.IsNull());
int menu_pin_string_id;
- const std::string app_id = controller_->GetAppIDForShelfID(item_.id);
- switch (GetPinnableForAppID(app_id, controller_->profile())) {
+ switch (GetPinnableForAppID(item_.id.app_id, controller_->profile())) {
case AppListControllerDelegate::PIN_EDITABLE:
menu_pin_string_id = controller_->IsPinned(item_.id)
? IDS_LAUNCHER_CONTEXT_MENU_UNPIN

Powered by Google App Engine
This is Rietveld 408576698