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

Side by Side Diff: Source/modules/quota/DeprecatedStorageInfo.h

Issue 158133003: Move quota module to oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert having empty destructors in header files. Created 6 years, 10 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef DeprecatedStorageInfo_h 31 #ifndef DeprecatedStorageInfo_h
32 #define DeprecatedStorageInfo_h 32 #define DeprecatedStorageInfo_h
33 33
34 #include "bindings/v8/ScriptWrappable.h" 34 #include "bindings/v8/ScriptWrappable.h"
35 #include "heap/Handle.h"
36 #include "modules/quota/DeprecatedStorageQuota.h"
tkent 2014/02/10 09:17:17 This include looks unnecessary.
sof 2014/02/10 09:19:51 But it isn't. You need the explicit #include to ge
haraken 2014/02/10 09:26:17 Yeah, if we use Member<X>/Persistent<X>, we need t
tkent 2014/02/10 09:28:39 ok, I undetstand.
Vyacheslav Egorov (Chromium) 2014/02/10 18:21:05 Member<X> should not need definition of X as it is
35 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
36 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
37 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
38 40
39 namespace WebCore { 41 namespace WebCore {
40 42
41 class DeprecatedStorageQuota;
42 class ExecutionContext; 43 class ExecutionContext;
43 class StorageErrorCallback; 44 class StorageErrorCallback;
44 class StorageQuotaCallback; 45 class StorageQuotaCallback;
45 class StorageUsageCallback; 46 class StorageUsageCallback;
46 47
47 class DeprecatedStorageInfo : public RefCounted<DeprecatedStorageInfo>, public S criptWrappable { 48 class DeprecatedStorageInfo : public RefCountedWillBeGarbageCollectedFinalized<D eprecatedStorageInfo>, public ScriptWrappable {
49 DECLARE_GC_INFO;
48 public: 50 public:
49 enum { 51 enum {
50 TEMPORARY, 52 TEMPORARY,
51 PERSISTENT, 53 PERSISTENT,
52 }; 54 };
53 55
54 static PassRefPtr<DeprecatedStorageInfo> create() 56 static PassRefPtrWillBeRawPtr<DeprecatedStorageInfo> create()
55 { 57 {
56 return adoptRef(new DeprecatedStorageInfo()); 58 return adoptRefWillBeNoop(new DeprecatedStorageInfo());
57 } 59 }
58 60
59 void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<Stora geUsageCallback>, PassOwnPtr<StorageErrorCallback>); 61 void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<Stora geUsageCallback>, PassOwnPtr<StorageErrorCallback>);
60 62
61 void requestQuota(ExecutionContext*, int storageType, unsigned long long new QuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback> ); 63 void requestQuota(ExecutionContext*, int storageType, unsigned long long new QuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback> );
62 64
63 ~DeprecatedStorageInfo(); 65 ~DeprecatedStorageInfo();
64 66
67 void trace(Visitor*);
68
65 private: 69 private:
66 DeprecatedStorageInfo(); 70 DeprecatedStorageInfo();
67 71
68 DeprecatedStorageQuota* getStorageQuota(int storageType); 72 DeprecatedStorageQuota* getStorageQuota(int storageType);
69 73
70 mutable RefPtr<DeprecatedStorageQuota> m_temporaryStorage; 74 mutable RefPtrWillBeMember<DeprecatedStorageQuota> m_temporaryStorage;
71 mutable RefPtr<DeprecatedStorageQuota> m_persistentStorage; 75 mutable RefPtrWillBeMember<DeprecatedStorageQuota> m_persistentStorage;
72 }; 76 };
73 77
74 } // namespace WebCore 78 } // namespace WebCore
75 79
76 #endif // DeprecatedStorageInfo_h 80 #endif // DeprecatedStorageInfo_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698