Commit e0ba92a4 authored by Staphany Park's avatar Staphany Park Committed by Commit Bot

Storage Service: Add use counters for Cache Storage read/write.

Bug: 1000932
Change-Id: Ia6ae52ff439c1d7e8d759e6f083fb04d08663b1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786616
Commit-Queue: Staphany Park <staphany@chromium.org>
Auto-Submit: Staphany Park <staphany@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693871}
parent 6d69488b
......@@ -2401,6 +2401,8 @@ enum WebFeature {
kWebSocketStreamConstructor = 3018,
kDOMStorageRead = 3019,
kDOMStorageWrite = 3020,
kCacheStorageRead = 3021,
kCacheStorageWrite = 3022,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
......
......@@ -8,11 +8,31 @@
SecureContext,
Exposed=(Window,Worker)
] interface Cache {
[CallWith=ScriptState, RaisesException] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, RaisesException] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, RaisesException] Promise<void> add(RequestInfo request);
[CallWith=ScriptState, RaisesException] Promise<void> addAll(sequence<RequestInfo> requests);
[CallWith=ScriptState, RaisesException] Promise<void> put(RequestInfo request, Response response);
[CallWith=ScriptState, ImplementedAs=Delete, RaisesException] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, RaisesException] Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, MeasureAs=CacheStorageRead, RaisesException]
Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, MeasureAs=CacheStorageRead, RaisesException]
Promise<sequence<Response>> matchAll(optional RequestInfo request,
optional CacheQueryOptions options);
[CallWith=ScriptState, MeasureAs=CacheStorageWrite, RaisesException]
Promise<void> add(RequestInfo request);
[CallWith=ScriptState, MeasureAs=CacheStorageWrite, RaisesException]
Promise<void> addAll(sequence<RequestInfo> requests);
[CallWith=ScriptState, MeasureAs=CacheStorageWrite, RaisesException]
Promise<void> put(RequestInfo request, Response response);
[
CallWith=ScriptState,
ImplementedAs=Delete,
MeasureAs=CacheStorageWrite,
RaisesException
] Promise<boolean> delete(RequestInfo request,
optional CacheQueryOptions options);
[CallWith=ScriptState, MeasureAs=CacheStorageRead, RaisesException]
Promise<sequence<Request>> keys(optional RequestInfo request,
optional CacheQueryOptions options);
};
......@@ -8,9 +8,18 @@
SecureContext,
Exposed=(Window,Worker)
] interface CacheStorage {
[CallWith=ScriptState, RaisesException] Promise<any> match(RequestInfo request, optional MultiCacheQueryOptions options);
[CallWith=ScriptState] Promise<boolean> has(DOMString cacheName);
[CallWith=ScriptState, MeasureAs=CacheStorageRead, RaisesException]
Promise<any> match(RequestInfo request,
optional MultiCacheQueryOptions options);
[CallWith=ScriptState, MeasureAs=CacheStorageRead]
Promise<boolean> has(DOMString cacheName);
[CallWith=ScriptState] Promise<Cache> open(DOMString cacheName);
[CallWith=ScriptState, ImplementedAs=Delete] Promise<boolean> delete(DOMString cacheName);
[CallWith=ScriptState] Promise<sequence<DOMString>> keys();
[CallWith=ScriptState, MeasureAs=CacheStorageWrite, ImplementedAs=Delete]
Promise<boolean> delete(DOMString cacheName);
[CallWith=ScriptState, MeasureAs=CacheStorageRead]
Promise<sequence<DOMString>> keys();
};
......@@ -24587,6 +24587,8 @@ Called by update_net_error_codes.py.-->
<int value="3018" label="WebSocketStreamConstructor"/>
<int value="3019" label="DOMStorageRead"/>
<int value="3020" label="DOMStorageWrite"/>
<int value="3021" label="CacheStorageRead"/>
<int value="3022" label="CacheStorageWrite"/>
</enum>
<enum name="FeaturePolicyAllowlistType">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment