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

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

Issue 700323003: Use Web IDL Union types in Service Worker's Cache interface (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/bindings/tests/results/core/UnionTypesCore.cpp ('k') | Source/modules/serviceworkers/Cache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Cache.h
diff --git a/Source/modules/serviceworkers/Cache.h b/Source/modules/serviceworkers/Cache.h
index 444bbd132f70d133c52656a149776b53c9b73b9e..20f4cc0006b08bad55978e25b0f5aaeab66a5f21 100644
--- a/Source/modules/serviceworkers/Cache.h
+++ b/Source/modules/serviceworkers/Cache.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/modules/v8/UnionTypesModules.h"
#include "core/dom/DOMException.h"
#include "modules/serviceworkers/CacheQueryOptions.h"
#include "public/platform/WebServiceWorkerCache.h"
@@ -24,6 +25,8 @@ class Response;
class Request;
class ScriptState;
+typedef RequestOrUSVString RequestInfo;
+
class Cache final : public GarbageCollectedFinalized<Cache>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
WTF_MAKE_NONCOPYABLE(Cache);
@@ -31,20 +34,14 @@ public:
static Cache* create(WebServiceWorkerCache*);
// From Cache.idl:
- ScriptPromise match(ScriptState*, Request*, const CacheQueryOptions&);
- ScriptPromise match(ScriptState*, const String&, const CacheQueryOptions&, ExceptionState&);
- ScriptPromise matchAll(ScriptState*, Request*, const CacheQueryOptions&);
- ScriptPromise matchAll(ScriptState*, const String&, const CacheQueryOptions&, ExceptionState&);
- ScriptPromise add(ScriptState*, Request*);
- ScriptPromise add(ScriptState*, const String&, ExceptionState&);
+ ScriptPromise match(ScriptState*, const RequestInfo&, const CacheQueryOptions&, ExceptionState&);
+ ScriptPromise matchAll(ScriptState*, const RequestInfo&, const CacheQueryOptions&, ExceptionState&);
+ ScriptPromise add(ScriptState*, const RequestInfo&, ExceptionState&);
ScriptPromise addAll(ScriptState*, const Vector<ScriptValue>&);
- ScriptPromise deleteFunction(ScriptState*, Request*, const CacheQueryOptions&);
- ScriptPromise deleteFunction(ScriptState*, const String&, const CacheQueryOptions&, ExceptionState&);
- ScriptPromise put(ScriptState*, Request*, Response*);
- ScriptPromise put(ScriptState*, const String&, Response*, ExceptionState&);
- ScriptPromise keys(ScriptState*);
- ScriptPromise keys(ScriptState*, Request*, const CacheQueryOptions&);
- ScriptPromise keys(ScriptState*, const String&, const CacheQueryOptions&, ExceptionState&);
+ ScriptPromise deleteFunction(ScriptState*, const RequestInfo&, const CacheQueryOptions&, ExceptionState&);
+ ScriptPromise put(ScriptState*, const RequestInfo&, Response*, ExceptionState&);
+ ScriptPromise keys(ScriptState*, ExceptionState&);
+ ScriptPromise keys(ScriptState*, const RequestInfo&, const CacheQueryOptions&, ExceptionState&);
static PassRefPtrWillBeRawPtr<DOMException> domExceptionForCacheError(WebServiceWorkerCacheError);
« no previous file with comments | « Source/bindings/tests/results/core/UnionTypesCore.cpp ('k') | Source/modules/serviceworkers/Cache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698