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 |