commit | f4dab61e56b780f1ee1c73daa643fe2a918c5e69 | [log] [tgz] |
---|---|---|
author | Sam McNally <[email protected]> | Wed Aug 16 03:06:33 2017 |
committer | Commit Bot <[email protected]> | Wed Aug 16 03:06:33 2017 |
tree | e30596027ec4a954b1cf5b040c28a13f48d17177 | |
parent | e3684bdd09ae1a352d1696bc574f3e6f81b3abb8 [diff] |
Maintain a connection to each profile's PrefService from ash. Move responsibility for managing per-user PrefService instances into ash::SessionController. When a new user is added, SessionController uses its Connector to connect to the "ash_pref_connector" service to obtain a prefs::mojom::PrefStoreConnector for that user, which it then uses to construct a client PrefService. Provide access to per-user prefs via GetUserPrefServiceForUser() which returns the PrefService for a particular AccountId or null if the connection has not completed successfully, and GetLastActiveUserPrefService(), which returns the PrefService for the last active user that had a PrefService. Consolidate the mash and non-mash code-paths for per-user prefs to always access per-user PrefService over mojo. Add a test-only method to SessionController so unit tests can inject a PrefService for an individual user without mocking out service manager. Change TestSessionControllerClient to default to injecting a PrefServicefPrefService for each user session it adds. Update ash unit tests to no longer inject their own PrefServices now the test helper handles it. Replace the preferences_forwarder service with ash_preferences_connector service. Instead of forwarding connections to the pref service for the active user, it provides access to a prefs::mojom::PrefStoreConnector for the AccountId request by SessionController. Add a new overload to prefs::ConnectToPrefService that takes a user-provided PrefStoreConnectorPtr for SessionController to use. Change prefs::ConnectToPrefService to wait until all PrefStores are initialized instead of just the user prefs pref store and add plumbing to PrefService and PrefValueStore to expose this information. Fix PrefRegistrySyncable::ForkForIncognito() to copy all fields from PrefRegistry. Bug: 752993,753149 Change-Id: Id36a18988b1e713199f3029cb04a72dd63bf1b34 Reviewed-on: https://chromium-review.googlesource.com/605027 Commit-Queue: Sam McNally <[email protected]> Reviewed-by: Bernhard Bauer <[email protected]> Reviewed-by: Michael Wasserman <[email protected]> Reviewed-by: Xiyuan Xia <[email protected]> Reviewed-by: Lei Zhang <[email protected]> Reviewed-by: Oliver Chang <[email protected]> Reviewed-by: James Cook <[email protected]> Cr-Commit-Position: refs/heads/master@{#494684}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .