Instead of the mojo interface we have now in shelf.mojom. See ash::Shelf::RegisterPrefs().
Mike, did you want to take this one? Or is this a dupe of another bug? The function is now ash::Shell::RegisterProfilePrefs(). NightLightController and LogoutButtonTray have some nice examples of how to monitor prefs across user switching.
Yeah, I'll take a look soon, thanks for passing this my way.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58 commit 39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58 Author: Michael Wasserman <msw@chromium.org> Date: Tue Aug 08 23:49:42 2017 mash: Move shelf prefs from Chrome to Ash. Move some of Chrome's shelf pref names to ash_pref_names. Move some shelf pref code to ash/public/cpp (used by Ash and Chrome). Remove now unused mojo interface functions and enum types. Make context menus modify prefs instead of setting values directly. (this is really the only code that should set the shelf pref values) Add SessionController::is_running_in_app_mode and Chrome init. (Ash needs to hide the shelf in Chrome's kiosk/app modes) Move Shelf's WindowTreeHostManager::Observer code to ShelfController. (use one observer, not per-display observers; share SetShelf*FromPrefs) Construct ShelfController in Shell::Init() to support Shell::Get() use. Init/update prefs & PrefRegistar in OnActiveUserPrefServiceChanged. Minor refactoring; add some basic unit tests. Bug: 723085 Test: No Chrome OS shelf alignment/auto-hide regressions. Change-Id: I109ee314093fac10402b50629a95171d88e2e26f TBR: bartfab@chromium.org Reviewed-on: https://chromium-review.googlesource.com/602737 Commit-Queue: Michael Wasserman <msw@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: James Cook <jamescook@chromium.org> Cr-Commit-Position: refs/heads/master@{#492778} [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/BUILD.gn [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/DEPS [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/BUILD.gn [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/DEPS [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/ash_pref_names.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/ash_pref_names.h [add] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/shelf_prefs.cc [add] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/shelf_prefs.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/cpp/shelf_struct_traits.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/interfaces/session_controller.mojom [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/public/interfaces/shelf.mojom [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/root_window_controller.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/session/session_controller.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/session/session_controller.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/session/session_controller_unittest.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf_alignment_menu.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf_controller.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf_controller.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf_controller_unittest.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shelf/shelf_unittest.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/ash/shell.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/policy/configuration_policy_handler_list_factory.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/chrome_launcher_prefs.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/chrome_launcher_prefs.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/launcher/launcher_context_menu.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/browser/ui/ash/session_controller_client.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/common/pref_names.cc [modify] https://crrev.com/39e4fe4dd00de853d99c73f84ffbe5e3fddb6c58/chrome/common/pref_names.h
Comment 1 by jamescook@chromium.org
, Aug 3 2017Owner: msw@chromium.org