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

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

Issue 1177983007: Cache Storage: restrict access to secure origins (Blink-side) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify DevTools agent changes Created 5 years, 4 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 | Annotate | Revision Log
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 CacheStorage_h 5 #ifndef CacheStorage_h
6 #define CacheStorage_h 6 #define CacheStorage_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 11 matching lines...) Expand all
22 class WebServiceWorkerCacheStorage; 22 class WebServiceWorkerCacheStorage;
23 23
24 class CacheStorage final : public GarbageCollectedFinalized<CacheStorage>, publi c ScriptWrappable { 24 class CacheStorage final : public GarbageCollectedFinalized<CacheStorage>, publi c ScriptWrappable {
25 DEFINE_WRAPPERTYPEINFO(); 25 DEFINE_WRAPPERTYPEINFO();
26 WTF_MAKE_NONCOPYABLE(CacheStorage); 26 WTF_MAKE_NONCOPYABLE(CacheStorage);
27 public: 27 public:
28 static CacheStorage* create(WeakPtr<GlobalFetch::ScopedFetcher>, WebServiceW orkerCacheStorage*); 28 static CacheStorage* create(WeakPtr<GlobalFetch::ScopedFetcher>, WebServiceW orkerCacheStorage*);
29 ~CacheStorage(); 29 ~CacheStorage();
30 void dispose(); 30 void dispose();
31 31
32 ScriptPromise open(ScriptState*, const String& cacheName); 32 ScriptPromise open(ScriptState*, const String& cacheName, ExceptionState&);
33 ScriptPromise has(ScriptState*, const String& cacheName); 33 ScriptPromise has(ScriptState*, const String& cacheName, ExceptionState&);
34 ScriptPromise deleteFunction(ScriptState*, const String& cacheName); 34 ScriptPromise deleteFunction(ScriptState*, const String& cacheName, Exceptio nState&);
35 ScriptPromise keys(ScriptState*); 35 ScriptPromise keys(ScriptState*, ExceptionState&);
36 ScriptPromise match(ScriptState*, const RequestInfo&, const CacheQueryOption s&, ExceptionState&); 36 ScriptPromise match(ScriptState*, const RequestInfo&, const CacheQueryOption s&, ExceptionState&);
37 37
38 DECLARE_TRACE(); 38 DECLARE_TRACE();
39 39
40 private: 40 private:
41 class Callbacks; 41 class Callbacks;
42 class WithCacheCallbacks; 42 class WithCacheCallbacks;
43 class DeleteCallbacks; 43 class DeleteCallbacks;
44 class KeysCallbacks; 44 class KeysCallbacks;
45 class MatchCallbacks; 45 class MatchCallbacks;
46 46
47 friend class WithCacheCallbacks; 47 friend class WithCacheCallbacks;
48 friend class DeleteCallbacks; 48 friend class DeleteCallbacks;
49 49
50 CacheStorage(WeakPtr<GlobalFetch::ScopedFetcher>, PassOwnPtr<WebServiceWorke rCacheStorage>); 50 CacheStorage(WeakPtr<GlobalFetch::ScopedFetcher>, PassOwnPtr<WebServiceWorke rCacheStorage>);
51 ScriptPromise matchImpl(ScriptState*, const Request*, const CacheQueryOption s&); 51 ScriptPromise matchImpl(ScriptState*, const Request*, const CacheQueryOption s&);
52 52
53 WeakPtr<GlobalFetch::ScopedFetcher> m_scopedFetcher; 53 WeakPtr<GlobalFetch::ScopedFetcher> m_scopedFetcher;
54 OwnPtr<WebServiceWorkerCacheStorage> m_webCacheStorage; 54 OwnPtr<WebServiceWorkerCacheStorage> m_webCacheStorage;
55 HeapHashMap<String, Member<Cache>> m_nameToCacheMap; 55 HeapHashMap<String, Member<Cache>> m_nameToCacheMap;
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif // CacheStorage_h 60 #endif // CacheStorage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698