SessionManagerClient: Add generic storage/retrieval methods
Adds StorePolicy, RetrievePolicy and BlockingRetrievePolicy methods to
SessionManagerClient, which map to the new storage interface in Session
Manager, and marks the old methods as deprecated. The next step will be
to replace all existing Store/Retrieve calls by these three.
This also adds support for storing/retrieving extension policy, which
is needed for Chromad (see crbug.com/735100).
Points all storage/retrieval methods in FakeSessionManagerClient to the
generic implementations, reducing the difference between the two code
path controlled by the PolicyStorageType enum. In a nutshell, policy
is stored
- in a file at <stub file path> if PolicyStorageType::kOnDisk is set and
- in a memory-based map at key <stub file path> if
PolicyStorageType::kInMemory is set.
The old way to store different policy in a separate location
(device_policy_, user_policies_ etc.) starts to get messy once extension
policy is introduced (you'd need an extra dimension of mappings for the
extension id aka component id).
BUG=chromium:765644
TEST=Ran some affected tests (DeviceSettingsServiceTest,
UserCloudPolicyStoreChromeOSTest
SiteIsolationFlagHandlingTest
DeviceCloudPolicyManagerChromeOSEnrollmentTest
OwnerSettingsServiceChromeOSTest), but mostly rely on trybots.
Change-Id: I1794d9264dc2ac8e7702cec4a079d6c9eb4c4091
Reviewed-on: https://chromium-review.googlesource.com/1024034
Commit-Queue: Lutz Justen <ljusten@chromium.org>
Reviewed-by:
Maksim Ivanov <emaxx@chromium.org>
Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by:
Julian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554808}
Showing
This diff is collapsed.
Please register or sign in to comment