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

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: Review v3 Created 4 years, 2 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 f3cbb73bf535b54cfa1bd26aae34d77c9e61a73b..e8ae69f47e48d25e9bc822cc2e4347660a445a1c 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,10 @@ 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::RemovePinPosition(
+ profile_, ash::launcher::AppLauncherId(GetAppIDForShelfID(id)));
+ }
if (controller->type() == LauncherItemController::TYPE_APP ||
controller->locked()) {
@@ -1177,7 +1179,7 @@ void ChromeLauncherControllerImpl::SyncPinPosition(ash::ShelfID shelf_id) {
DCHECK(!app_id.empty());
std::string app_id_before;
- std::vector<std::string> app_ids_after;
+ std::vector<ash::launcher::AppLauncherId> app_launcher_ids_after;
for (int i = index - 1; i > 0; --i) {
const ash::ShelfID shelf_id_before = model_->items()[i].id;
@@ -1193,11 +1195,14 @@ void ChromeLauncherControllerImpl::SyncPinPosition(ash::ShelfID shelf_id) {
if (IsPinned(shelf_id_after)) {
const std::string app_id_after = GetAppIDForShelfID(shelf_id_after);
DCHECK(!app_id_after.empty());
- app_ids_after.push_back(app_id_after);
+ app_launcher_ids_after.push_back(
+ ash::launcher::AppLauncherId(app_id_after));
}
}
- ash::launcher::SetPinPosition(profile_, app_id, app_id_before, app_ids_after);
+ ash::launcher::SetPinPosition(profile_, ash::launcher::AppLauncherId(app_id),
+ ash::launcher::AppLauncherId(app_id_before),
+ app_launcher_ids_after);
}
void ChromeLauncherControllerImpl::OnSyncModelUpdated() {

Powered by Google App Engine
This is Rietveld 408576698