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

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

Issue 603673002: Reland of "Introducing the WebServiceWorkerCache." (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@minimaster
Patch Set: build fix Created 6 years, 3 months 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/modules.gypi ('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 1e93873e210183e0ce1c2452f14bbd319636dc1c..491b607cf18de41b4dd655e116619b6e1d9822a6 100644
--- a/Source/modules/serviceworkers/Cache.h
+++ b/Source/modules/serviceworkers/Cache.h
@@ -8,12 +8,13 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/DOMException.h"
+#include "public/platform/WebServiceWorkerCache.h"
#include "public/platform/WebServiceWorkerCacheError.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
-#include <v8.h>
namespace blink {
@@ -21,9 +22,8 @@ class Dictionary;
class Response;
class Request;
class ScriptState;
-class WebServiceWorkerCache;
-class Cache FINAL : public GarbageCollected<Cache>, public ScriptWrappable {
+class Cache FINAL : public GarbageCollectedFinalized<Cache>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
WTF_MAKE_NONCOPYABLE(Cache);
public:
@@ -45,14 +45,23 @@ public:
ScriptPromise keys(ScriptState*, Request*, const Dictionary& queryParams);
ScriptPromise keys(ScriptState*, const String&, const Dictionary& queryParams);
- void trace(Visitor*) { }
-
static PassRefPtrWillBeRawPtr<DOMException> domExceptionForCacheError(WebServiceWorkerCacheError);
+ void trace(Visitor*) { }
+
private:
- explicit Cache(WebServiceWorkerCache* webCache);
+ explicit Cache(WebServiceWorkerCache*);
+
+ ScriptPromise matchImpl(ScriptState*, Request*, const Dictionary& queryParams);
+ ScriptPromise matchAllImpl(ScriptState*, Request*, const Dictionary& queryParams);
+ ScriptPromise addImpl(ScriptState*, Request*);
+ ScriptPromise addAllImpl(ScriptState*, Vector<Request*>);
+ ScriptPromise deleteImpl(ScriptState*, Request*, const Dictionary& queryParams);
+ ScriptPromise putImpl(ScriptState*, Request*, Response*);
+ ScriptPromise keysImpl(ScriptState*);
+ ScriptPromise keysImpl(ScriptState*, Request*, const Dictionary& queryParams);
- WebServiceWorkerCache const* ALLOW_UNUSED m_webCache;
+ OwnPtr<WebServiceWorkerCache> m_webCache;
};
} // namespace blink
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/Cache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698