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

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

Issue 2352353002: Add AppLauncherId wrapper for items shown in shelf (Closed)
Patch Set: Include AppLauncherId in prefs code v2 Created 4 years, 3 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/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 624c3f5eab685a3b49e76fa55b08ef5e57b6c544..3e3a5ae8858e42bff22c5836f0b8b7a36bf5339f 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
@@ -392,8 +392,11 @@ void ChromeLauncherControllerImpl::UnpinAndUpdatePrefs(ash::ShelfID id,
LauncherItemController* controller = GetLauncherItemController(id);
CHECK(controller);
- if (update_prefs)
- ash::launcher::RemovePinPosition(profile_, GetAppIDForShelfID(id));
+ if (update_prefs) {
+ ash::launcher::AppLauncherId* app_launcher_id =
+ new ash::launcher::AppLauncherId(GetAppIDForShelfID(id));
+ ash::launcher::RemovePinPosition(profile_, app_launcher_id);
+ }
if (controller->type() == LauncherItemController::TYPE_APP ||
controller->locked()) {
@@ -1197,7 +1200,15 @@ void ChromeLauncherControllerImpl::SyncPinPosition(ash::ShelfID shelf_id) {
}
}
- ash::launcher::SetPinPosition(profile_, app_id, app_id_before, app_id_after);
+ ash::launcher::AppLauncherId* app_launcher_id =
+ new ash::launcher::AppLauncherId(app_id);
+ ash::launcher::AppLauncherId* app_launcher_id_before =
+ new ash::launcher::AppLauncherId(app_id_before);
+ ash::launcher::AppLauncherId* app_launcher_id_after =
+ new ash::launcher::AppLauncherId(app_id_after);
+
+ ash::launcher::SetPinPosition(profile_, app_launcher_id,
+ app_launcher_id_before, app_launcher_id_after);
}
void ChromeLauncherControllerImpl::OnSyncModelUpdated() {

Powered by Google App Engine
This is Rietveld 408576698