Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: Source/modules/serviceworkers/Cache.idl

Issue 723643002: Service Worker: Include promise types in IDL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/CacheStorage.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Cache.idl
diff --git a/Source/modules/serviceworkers/Cache.idl b/Source/modules/serviceworkers/Cache.idl
index 9ffbf8e1b25ae1cc1183231799c38ceb83273a9c..50943be845cde4323c695f2f9eaf814f2bd1f556 100644
--- a/Source/modules/serviceworkers/Cache.idl
+++ b/Source/modules/serviceworkers/Cache.idl
@@ -12,21 +12,19 @@ typedef (Request or USVString) RequestInfo;
RuntimeEnabled=ServiceWorkerCache,
TypeChecking=Interface,
] interface Cache {
- [CallWith=ScriptState, RaisesException] Promise match(RequestInfo request, optional CacheQueryOptions options);
+ [CallWith=ScriptState, RaisesException] Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
// FIXME: Implement matchAll(): http://crbug.com/428363
// FIXME: First argument of matchAll() should be optional: http://crbug.com/425459
- // [CallWith=ScriptState, RaisesException] Promise matchAll(RequestInfo request, optional CacheQueryOptions options);
+ // [CallWith=ScriptState, RaisesException] Promise<sequence<Response>> matchAll(RequestInfo request, optional CacheQueryOptions options);
// FIXME: Implement add(): http://crbug.com/427652
- // [CallWith=ScriptState, RaisesException] Promise add(RequestInfo request);
+ // [CallWith=ScriptState, RaisesException] Promise<void> add(RequestInfo request);
// FIXME: Implement addAll(): http://crbug.com/427652
- // FIXME: Sequences of Unions are not yet supported, instead bind a generic type. http://crbug.com/240176
- // [CallWith=ScriptState] Promise addAll(sequence<RequestInfo> requests);
- // [CallWith=ScriptState] Promise addAll(sequence<any> requests);
+ // [CallWith=ScriptState] Promise<void> addAll(sequence<RequestInfo> requests);
- [CallWith=ScriptState, RaisesException] Promise put(RequestInfo request, Response response);
- [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] Promise delete(RequestInfo request, optional CacheQueryOptions options);
- [CallWith=ScriptState, RaisesException] Promise keys(optional RequestInfo request, optional CacheQueryOptions options);
+ [CallWith=ScriptState, RaisesException] Promise<void> put(RequestInfo request, Response response);
+ [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
+ [CallWith=ScriptState, RaisesException] Promise<sequence<Response>> keys(optional RequestInfo request, optional CacheQueryOptions options);
};
« no previous file with comments | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/CacheStorage.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698