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

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: Use ScopedPinSyncDisabler name suggestion. 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
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b78e770896cdca9512a4acfa9f86d4e3b0acc3e9 100644
--- a/chrome/browser/ui/ash/launcher/launcher_arc_app_updater.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_arc_app_updater.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/ash/launcher/launcher_arc_app_updater.h"
+#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
+
LauncherArcAppUpdater::LauncherArcAppUpdater(
Delegate* delegate,
content::BrowserContext* browser_context)
@@ -26,6 +28,13 @@ void LauncherArcAppUpdater::OnAppRegistered(
}
void LauncherArcAppUpdater::OnAppRemoved(const std::string& app_id) {
+ // ChromeLauncherController generally removes items from the sync model when
+ // they are removed from the shelf model, but that should not happen when ARC
+ // apps are disabled due to ARC itself being disabled. The app entries should
+ // remain in the sync model for other synced devices that do support ARC, and
+ // to restore the respective shelf items if ARC is re-enabled on this device.
+ ChromeLauncherController::ScopedPinSyncDisabler scoped_pin_sync_disabler =
+ ChromeLauncherController::instance()->GetScopedPinSyncDisabler();
delegate()->OnAppUninstalledPrepared(browser_context(), app_id);
delegate()->OnAppUninstalled(browser_context(), app_id);
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698