DescriptionThe chrome.lockScreen.data API implementation
Introduces a data item storage for data created on lock screen.
Data items are persisted on disk in per-extension value stores backed by
leveldb (same backend as chrome.storage.local API).
Value store is structured as follows:
* registered_items -> dictionary whose keys are IDs of registered item
Dictionary values are currently empty dictionaries, but could be
extended in future to contain data item metadata, if required.
* item ID -> base64 encoded encrypted data item content
Note that data item content is encrypted because the storage is kept
outside user directory. Encrypted data is base 64 encoded because value
store does not currently support binary data (the DB values are
preserved as JSON strings, and JSON writer does not handle binary
values well).
Additionally, this CL adds a dictionary to local state that maps extension
IDs to number of lock screen data items registered for the extension.
The purpose of this dictionary is to enable the lockScreen.data API to
determine set of apps to which it should set OnDataItemsAvailable event
when user session is activated without querying the values store
database for each installed extension.
BUG=715781
Review-Url: https://codereview.chromium.org/2934293003
Cr-Commit-Position: refs/heads/master@{#486636}
Committed: https://chromium.googlesource.com/chromium/src/+/d9a88fc99f8b5465f13c6d9f8c6af42994f5335e
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #Patch Set 4 : . #Patch Set 5 : remove FilePath*UTF8Unsafe methods #
Total comments: 13
Patch Set 6 : . #Patch Set 7 : . #Patch Set 8 : value store for backend #Patch Set 9 : . #Patch Set 10 : . #Patch Set 11 : . #
Total comments: 8
Patch Set 12 : rkc feedback #Patch Set 13 : few more comment updates #Patch Set 14 : rename item_storage in browser_prefs #
Total comments: 22
Patch Set 15 : review feedback #Patch Set 16 : switch to BackendTaskRunner #Messages
Total messages: 47 (29 generated)
|