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

Side by Side Diff: Source/modules/cachestorage/Cache.h

Issue 1124403005: CacheStorage: Implement Cache.addAll() behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Cache_h 5 #ifndef Cache_h
6 #define Cache_h 6 #define Cache_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/modules/v8/UnionTypesModules.h" 10 #include "bindings/modules/v8/UnionTypesModules.h"
(...skipping 20 matching lines...) Expand all
31 class MODULES_EXPORT Cache final : public GarbageCollectedFinalized<Cache>, publ ic ScriptWrappable { 31 class MODULES_EXPORT Cache final : public GarbageCollectedFinalized<Cache>, publ ic ScriptWrappable {
32 DEFINE_WRAPPERTYPEINFO(); 32 DEFINE_WRAPPERTYPEINFO();
33 WTF_MAKE_NONCOPYABLE(Cache); 33 WTF_MAKE_NONCOPYABLE(Cache);
34 public: 34 public:
35 static Cache* create(WeakPtr<GlobalFetch::ScopedFetcher>, WebServiceWorkerCa che*); 35 static Cache* create(WeakPtr<GlobalFetch::ScopedFetcher>, WebServiceWorkerCa che*);
36 36
37 // From Cache.idl: 37 // From Cache.idl:
38 ScriptPromise match(ScriptState*, const RequestInfo&, const CacheQueryOption s&, ExceptionState&); 38 ScriptPromise match(ScriptState*, const RequestInfo&, const CacheQueryOption s&, ExceptionState&);
39 ScriptPromise matchAll(ScriptState*, const RequestInfo&, const CacheQueryOpt ions&, ExceptionState&); 39 ScriptPromise matchAll(ScriptState*, const RequestInfo&, const CacheQueryOpt ions&, ExceptionState&);
40 ScriptPromise add(ScriptState*, const RequestInfo&, ExceptionState&); 40 ScriptPromise add(ScriptState*, const RequestInfo&, ExceptionState&);
41 ScriptPromise addAll(ScriptState*, const Vector<ScriptValue>&); 41 ScriptPromise addAll(ScriptState*, const HeapVector<RequestInfo>&, Exception State&);
42 ScriptPromise deleteFunction(ScriptState*, const RequestInfo&, const CacheQu eryOptions&, ExceptionState&); 42 ScriptPromise deleteFunction(ScriptState*, const RequestInfo&, const CacheQu eryOptions&, ExceptionState&);
43 ScriptPromise put(ScriptState*, const RequestInfo&, Response*, ExceptionStat e&); 43 ScriptPromise put(ScriptState*, const RequestInfo&, Response*, ExceptionStat e&);
44 ScriptPromise keys(ScriptState*, ExceptionState&); 44 ScriptPromise keys(ScriptState*, ExceptionState&);
45 ScriptPromise keys(ScriptState*, const RequestInfo&, const CacheQueryOptions &, ExceptionState&); 45 ScriptPromise keys(ScriptState*, const RequestInfo&, const CacheQueryOptions &, ExceptionState&);
46 46
47 static WebServiceWorkerCache::QueryParams toWebQueryParams(const CacheQueryO ptions&); 47 static WebServiceWorkerCache::QueryParams toWebQueryParams(const CacheQueryO ptions&);
48 48
49 DEFINE_INLINE_TRACE() { } 49 DEFINE_INLINE_TRACE() { }
50 50
51 private: 51 private:
52 class BarrierCallbackForPut; 52 class BarrierCallbackForPut;
53 class BlobHandleCallbackForPut; 53 class BlobHandleCallbackForPut;
54 class FetchResolvedForAdd; 54 class FetchResolvedForAdd;
55 friend class FetchResolvedForAdd; 55 friend class FetchResolvedForAdd;
56 Cache(WeakPtr<GlobalFetch::ScopedFetcher>, WebServiceWorkerCache*); 56 Cache(WeakPtr<GlobalFetch::ScopedFetcher>, WebServiceWorkerCache*);
57 57
58 ScriptPromise matchImpl(ScriptState*, const Request*, const CacheQueryOption s&); 58 ScriptPromise matchImpl(ScriptState*, const Request*, const CacheQueryOption s&);
59 ScriptPromise matchAllImpl(ScriptState*, const Request*, const CacheQueryOpt ions&); 59 ScriptPromise matchAllImpl(ScriptState*, const Request*, const CacheQueryOpt ions&);
60 ScriptPromise addAllImpl(ScriptState*, const Vector<Request*>&, ExceptionSta te&); 60 ScriptPromise addAllImpl(ScriptState*, const HeapVector<Member<Request>>&, E xceptionState&);
61 ScriptPromise deleteImpl(ScriptState*, const Request*, const CacheQueryOptio ns&); 61 ScriptPromise deleteImpl(ScriptState*, const Request*, const CacheQueryOptio ns&);
62 ScriptPromise putImpl(ScriptState*, const HeapVector<Member<Request>>&, cons t HeapVector<Member<Response>>&); 62 ScriptPromise putImpl(ScriptState*, const HeapVector<Member<Request>>&, cons t HeapVector<Member<Response>>&);
63 ScriptPromise keysImpl(ScriptState*); 63 ScriptPromise keysImpl(ScriptState*);
64 ScriptPromise keysImpl(ScriptState*, const Request*, const CacheQueryOptions &); 64 ScriptPromise keysImpl(ScriptState*, const Request*, const CacheQueryOptions &);
65 65
66 WebServiceWorkerCache* webCache() const; 66 WebServiceWorkerCache* webCache() const;
67 67
68 WeakPtr<GlobalFetch::ScopedFetcher> m_scopedFetcher; 68 WeakPtr<GlobalFetch::ScopedFetcher> m_scopedFetcher;
69 OwnPtr<WebServiceWorkerCache> m_webCache; 69 OwnPtr<WebServiceWorkerCache> m_webCache;
70 }; 70 };
71 71
72 } // namespace blink 72 } // namespace blink
73 73
74 #endif // Cache_h 74 #endif // Cache_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698