Store URLs in WebappDataStorage, and purge them when history is cleared.
Sites which have been added to homescreen on Android should be
allowed to open in standalone mode in response to push notifications. As
Chromium cannot detect what sites are on the homescreen after they
have been added, the heuristic is sites which have been launched from
homescreen within the last ten days will be opened in standalone from
a tap on a notification.
This CL lays the groundwork for this feature by storing webapp URLs
in WebappDataStorage. This is needed to be able to look up the last used
time, which is currently persisted in WebappDataStorage.
The last used time and webapp URL combined are history, so this
CL also resets both pieces of data when the user clears their history.
This requires further changes to allow null values in these fields. The
last used time is set appropriately when the app is next launched from
homescreen; the URL is reset if it is empty when the app is launched.
Additional tests for the behaviour introduced in this CL are added.
BUG=541711,570579
Review URL: https://codereview.chromium.org/1749603002
Cr-Commit-Position: refs/heads/master@{#383223}
18 files changed