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

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

Issue 2769323002: mash: Update shelf pin prefs in ShelfModelObserver overrides. (Closed)
Patch Set: Cleanup; fix tests by ignoring initial browser shortcut pin position syncing. Created 3 years, 9 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_arc_app_updater.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_arc_app_updater.cc b/chrome/browser/ui/ash/launcher/launcher_arc_app_updater.cc
index 503d9101224d48a1e92cbeeaa122e9b86b5a69cf..ac6ac97d70ea6495566ea9fb2ade5a4baac7c435 100644
--- a/chrome/browser/ui/ash/launcher/launcher_arc_app_updater.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_arc_app_updater.cc
@@ -26,6 +26,13 @@ void LauncherArcAppUpdater::OnAppRegistered(
}
void LauncherArcAppUpdater::OnAppRemoved(const std::string& app_id) {
+ // When disabling ARC, apps are removed, but sync items should not be deleted.
James Cook 2017/03/29 14:28:02 I suggest explaining why the items should not be d
msw 2017/03/29 21:34:17 Done.
+ // Notify the delegate that the app is being disabled, and shelf item removal
+ // should not trigger pin position removal from the sync model. When app
+ // removal should be synced, AppListModelBuilder::RemoveApp will call
+ // AppListSyncableService::RemoveUninstalledItem and trigger RemoveSyncItem.
+ delegate()->OnAppDisabling(app_id);
delegate()->OnAppUninstalledPrepared(browser_context(), app_id);
delegate()->OnAppUninstalled(browser_context(), app_id);
+ delegate()->OnAppDisabled(app_id);
James Cook 2017/03/29 14:28:03 It seems like these OnAppDisabling() etc. function
msw 2017/03/29 21:34:17 Good call! Changed this to directly call into Chro
}

Powered by Google App Engine
This is Rietveld 408576698