forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass initial display prefs from Chrome to ash::Shell
The solution to this was kind of subtle. Here are some notes for posterity: * ash::Shell::local_state_ (the device PrefService used by Ash) is loaded asynchronously, after Shell::Init. * Display preferences need to be initialized synchronously; there are currently too many dependencies to make asynchronous initialization robust. * Thus for 'classic' mode, we need to provide initial display prefs from the synchronously loaded browser local state prefs to ash::Shell::Init. * Registering prefs has to occur early (before feature flags are loaded), so using different registration for classic/mus/mash would be complicated. Instead we always register display prefs in chrome and treat them as foreign prefs in ash (except for tests). * Because of the complications of pref registration, accessing a second, synchronously loaded, PrefService instance in Ash would be difficult. Instead we extract a base::Value dictionary of display prefs and pass that in ShellInitParams. This fixes 'classic' mode, but does not solve the problem for mus/mash (which has never worked). Potential long term solutions: (a) Store display prefs in an Ash specific value store that is synchronously loaded (along with other similar prefs). (b) Initialize Shell::local_state_ with the initial state before the Mash process forks (solving any registration issues this entails). (c) Make initial display configuration work asynchronously. Bug: 834775 Change-Id: I75e561394c817e7c93d8c724bdadcaa37ef868af Reviewed-on: https://chromium-review.googlesource.com/1028479 Reviewed-by: Dominic Battré <battre@chromium.org> Reviewed-by: James Cook <jamescook@chromium.org> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Commit-Queue: Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#555348}
- Loading branch information
Showing
22 changed files
with
477 additions
and
169 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.