From dff574ea14f748f7ac5b08d66aed5f4e0e05cc47 Mon Sep 17 00:00:00 2001 From: Jarryd Goodman Date: Mon, 22 Apr 2019 14:07:11 -0700 Subject: [PATCH] Add UsageDetails dictionary. --- storage.bs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/storage.bs b/storage.bs index 79497f6..6bd6c83 100644 --- a/storage.bs +++ b/storage.bs @@ -178,6 +178,7 @@ larger site storage quota. Factors such as navigation frequency, recency bookmarking, and permission for {{"persistent-storage"}} can be used as indications of "popularity". +A site storage backend is a specific site storage implementation.

User Interface Guidelines

@@ -234,7 +235,17 @@ interface StorageManager { dictionary StorageEstimate { unsigned long long usage; unsigned long long quota; + StorageUsageDetails usageDetails; }; + +dictionary StorageUsageDetails { + unsigned long long applicationCache; + unsigned long long indexedDB; + unsigned long long caches; + unsigned long long serviceWorkerRegistrations; + unsigned long long fileSystem; +}; + The persisted() method, when invoked, must run @@ -331,8 +342,13 @@ must run these steps:
  • Let quota be site storage quota for origin. +

  • Let usageDetails be a new {{StorageUsageDetails}} dictionary + whose members are the site storage usage for each site storage backend + for which the site storage usage is greater than 0. +

  • Let dictionary be a new {{StorageEstimate}} dictionary whose {{usage}} member - is usage and {{quota}} member is quota. + is usage, {{quota}} member is quota and {{usageDetails}} + member is usageDetails.

  • If there was an internal error while obtaining usage and quota, then