Skip to content

Commit

Permalink
Add UsageDetails dictionary.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarryd Goodman committed Apr 22, 2019
1 parent 725373f commit 1e7028a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion storage.bs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ larger <a>site storage quota</a>. Factors such as navigation frequency, recency
bookmarking, and <a href="#persistence">permission</a> for {{"persistent-storage"}} can be used as
indications of "popularity".

A <dfn export>site storage backend</dfn> is a specific site storage implementation.


<h2 id=ui-guidelines>User Interface Guidelines</h2>
Expand Down Expand Up @@ -234,7 +235,16 @@ interface StorageManager {
dictionary StorageEstimate {
unsigned long long usage;
unsigned long long quota;
StorageUsageDetails usageDetails;
};

dictionary StorageUsageDetails {
unsigned long long applicationCache;
unsigned long long caches;
unsigned long long indexedDB;
unsigned long long serviceWorkerRegistrations;
};

</pre>

The <dfn method for=StorageManager><code>persisted()</code></dfn> method, when invoked, must run
Expand Down Expand Up @@ -331,8 +341,13 @@ must run these steps:

<li><p>Let <var>quota</var> be <a>site storage quota</a> for <var>origin</var>.

<li><p>Let <var>usageDetails</var> be a new {{StorageUsageDetails}} dictionary
whose members are the <a>site storage usage</a> for each <a>site storage backend</a>
for which the <a>site storage usage</a> is greater than 0.

<li><p>Let <var>dictionary</var> be a new {{StorageEstimate}} dictionary whose {{usage}} member
is <var>usage</var> and {{quota}} member is <var>quota</var>.
is <var>usage</var>, {{quota}} member is <var>quota</var> and {{usageDetails}}
member is <var>usageDetails</var>.

<li>
<p>If there was an internal error while obtaining <var>usage</var> and <var>quota</var>, then
Expand Down

0 comments on commit 1e7028a

Please sign in to comment.