diff --git a/storage.bs b/storage.bs index 79497f6..38d0c3f 100644 --- a/storage.bs +++ b/storage.bs @@ -18,7 +18,7 @@ these APIs by defining:
Traditionally, as the user runs out of storage space on their device, the data stored with these @@ -178,7 +178,18 @@ larger site storage quota. Factors such as navigation frequency, recency bookmarking, and permission for {{"persistent-storage"}} can be used as indications of "popularity". +The application cache site storage usage for an origin is a rough estimate of the amount +of bytes used in Application Cache in origin's site storage unit. [[HTML#appcache]] +The caches site storage usage for an origin is a rough estimate of the amount +of bytes used in Cache API in origin's site storage unit. [[service-workers-1#cache-objects]] + +The indexedDB site storage usage for an origin is a rough estimate of the amount +of bytes used in IndexedDB in origin's site storage unit. [[IndexedDB]] + +The service worker registration site storage usage for an origin is a rough +estimate of the amount of bytes used in service worker registrations in origin's +site storage unit. [[service-workers-1]]
persisted()
method, when invoked, must run
@@ -331,8 +351,26 @@ must run these steps:
Let quota be site storage quota for origin. -
Let dictionary be a new {{StorageEstimate}} dictionary whose {{usage}} member - is usage and {{quota}} member is quota. +
Let applicationCache be application cache site storage usage + for origin. + +
Let indexedDB be indexedDB site storage usage for origin. + +
Let caches be caches site storage usage for origin. + +
Let serviceWorkerRegistrations be service worker registration + site storage usage for origin. + +
Let usageDetails be a new {{StorageUsageDetails}} dictionary + whose {{StorageUsageDetails/applicationCache}} member is applicationCache, + {{StorageUsageDetails/indexedDB}} member is indexedDB, {{StorageUsageDetails/caches}} + member is caches, and {{StorageUsageDetails/serviceWorkerRegistrations}} member is + serviceWorkerRegistrations. Any member for which the site storage usage + is less than 0 should be excluded from the {{StorageUsageDetails}} dictionary. + +
Let dictionary be a new {{StorageEstimate}} dictionary whose {{StorageEstimate/usage}} member + is usage, {{StorageEstimate/quota}} member is quota and {{StorageEstimate/usageDetails}} + member is usageDetails.
If there was an internal error while obtaining usage and quota, then