Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "modules/serviceworkers/Cache.h" | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 namespace { | |
| 14 | |
| 15 ScriptPromise RejectAsNotImplemented(ScriptState* scriptState) | |
|
falken
2014/08/06 04:46:28
blink function names start with lowercase
gavinp
2014/08/08 19:55:26
Done.
| |
| 16 { | |
| 17 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState); | |
| 18 const ScriptPromise promise = resolver->promise(); | |
| 19 resolver->reject("not implemented"); | |
| 20 | |
| 21 return promise; | |
| 22 } | |
| 23 | |
| 24 } | |
| 25 | |
| 26 PassRefPtrWillBeRawPtr<Cache> Cache::fromWebServiceWorkerCache(WebServiceWorkerC ache* webCache) | |
| 27 { | |
| 28 return adoptRefWillBeNoop(new Cache(webCache)); | |
| 29 } | |
| 30 | |
| 31 // FIXME: Implement these methods. | |
| 32 ScriptPromise Cache::match(ScriptState* scriptState, Request* request, const Dic tionary& queryParams) | |
| 33 { | |
| 34 return RejectAsNotImplemented(scriptState); | |
| 35 } | |
| 36 | |
| 37 ScriptPromise Cache::match(ScriptState* scriptState, const String& requestString , const Dictionary& queryParams) | |
| 38 { | |
| 39 return RejectAsNotImplemented(scriptState); | |
| 40 } | |
| 41 | |
| 42 ScriptPromise Cache::matchAll(ScriptState* scriptState, Request* request, const Dictionary& queryParams) | |
| 43 { | |
| 44 return RejectAsNotImplemented(scriptState); | |
| 45 } | |
| 46 | |
| 47 ScriptPromise Cache::matchAll(ScriptState* scriptState, const String& requestStr ing, const Dictionary& queryParams) | |
| 48 { | |
| 49 return RejectAsNotImplemented(scriptState); | |
| 50 } | |
| 51 | |
| 52 ScriptPromise Cache::add(ScriptState* scriptState, Request* request) | |
| 53 { | |
| 54 return RejectAsNotImplemented(scriptState); | |
| 55 } | |
| 56 | |
| 57 ScriptPromise Cache::add(ScriptState* scriptState, const String& requestString) | |
| 58 { | |
| 59 return RejectAsNotImplemented(scriptState); | |
| 60 } | |
| 61 | |
| 62 ScriptPromise Cache::addAll(ScriptState* scriptState, const WillBeHeapVector<Scr iptValue>& rawRequests) | |
| 63 { | |
| 64 return RejectAsNotImplemented(scriptState); | |
| 65 } | |
| 66 | |
| 67 ScriptPromise Cache::deleteFunction(ScriptState* scriptState, Request* request, const Dictionary& queryParams) | |
| 68 { | |
| 69 return RejectAsNotImplemented(scriptState); | |
| 70 } | |
| 71 | |
| 72 ScriptPromise Cache::deleteFunction(ScriptState* scriptState, const String& requ estString, const Dictionary& queryParams) | |
| 73 { | |
| 74 return RejectAsNotImplemented(scriptState); | |
| 75 } | |
| 76 | |
| 77 ScriptPromise Cache::put(ScriptState* scriptState, Request* request, Response*) | |
| 78 { | |
| 79 return RejectAsNotImplemented(scriptState); | |
| 80 } | |
| 81 | |
| 82 ScriptPromise Cache::put(ScriptState* scriptState, const String& requestString, Response*) | |
| 83 { | |
| 84 return RejectAsNotImplemented(scriptState); | |
| 85 } | |
| 86 | |
| 87 ScriptPromise Cache::keys(ScriptState* scriptState) | |
| 88 { | |
| 89 return RejectAsNotImplemented(scriptState); | |
| 90 } | |
| 91 | |
| 92 ScriptPromise Cache::keys(ScriptState* scriptState, Request* request, const Dict ionary& queryParams) | |
| 93 { | |
| 94 return RejectAsNotImplemented(scriptState); | |
| 95 } | |
| 96 | |
| 97 ScriptPromise Cache::keys(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams) | |
| 98 { | |
| 99 return RejectAsNotImplemented(scriptState); | |
| 100 } | |
| 101 | |
| 102 Cache::Cache(WebServiceWorkerCache* webCache) : m_webCache(webCache) | |
| 103 { | |
| 104 ScriptWrappable::init(this); | |
| 105 } | |
| 106 | |
| 107 } // namespace blink | |
| OLD | NEW |