The 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}
14 files changed