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
|
} |