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

Unified Diff: Source/modules/serviceworkers/FetchStore.cpp

Issue 434543002: Introducing the ServiceWorker Cache object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
Index: Source/modules/serviceworkers/FetchStore.cpp
diff --git a/Source/modules/serviceworkers/FetchStore.cpp b/Source/modules/serviceworkers/FetchStore.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f6ff0c801314f7fc3ca17c24c95de0ee14bf2400
--- /dev/null
+++ b/Source/modules/serviceworkers/FetchStore.cpp
@@ -0,0 +1,102 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "modules/serviceworkers/FetchStore.h"
+
+#include "bindings/core/v8/ScriptPromiseResolver.h"
+#include "bindings/core/v8/ScriptState.h"
+
+namespace blink {
+
+namespace {
+
+ScriptPromise RejectAsNotImplemented(ScriptState* scriptState)
+{
+ RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ const ScriptPromise promise = resolver->promise();
+ resolver->reject("not implemented");
+
+ return promise;
+}
+
+}
+
+PassRefPtrWillBeRawPtr<FetchStore> FetchStore::create(int fetchStoreID)
+{
+ return adoptRefWillBeNoop(new FetchStore(fetchStoreID));
+}
+
+// FIXME: Implement these methods.
+ScriptPromise FetchStore::match(ScriptState* scriptState, Request* request, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::match(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::FetchStore::matchAll(ScriptState* scriptState, Request* request, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::matchAll(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::add(ScriptState* scriptState, const WillBeHeapVector<ScriptValue>& rawRequests)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::deleteFunction(ScriptState* scriptState, Request* request, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::deleteFunction(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::put(ScriptState* scriptState, Request* request, Response*)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::put(ScriptState* scriptState, const String& requestString, Response*)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::keys(ScriptState* scriptState)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::keys(ScriptState* scriptState, Request* request, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::keys(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+ScriptPromise FetchStore::batch(ScriptState* scriptState, const Vector<Dictionary>& queryParams)
+{
+ return RejectAsNotImplemented(scriptState);
+}
+
+FetchStore::FetchStore(int fetchStoreID) : m_fetchStoreID(fetchStoreID)
+{
+ ScriptWrappable::init(this);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698