OLD | NEW |
---|---|
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 Loading... | |
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 DeprecatedStorageQuota_h | 31 #ifndef DeprecatedStorageQuota_h |
32 #define DeprecatedStorageQuota_h | 32 #define DeprecatedStorageQuota_h |
33 | 33 |
34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
35 #include "heap/Handle.h" | |
36 #include "heap/ThreadState.h" | |
35 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
36 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
37 | 39 |
38 namespace WebCore { | 40 namespace WebCore { |
39 | 41 |
40 class ExecutionContext; | 42 class ExecutionContext; |
41 class StorageErrorCallback; | 43 class StorageErrorCallback; |
42 class StorageQuotaCallback; | 44 class StorageQuotaCallback; |
43 class StorageUsageCallback; | 45 class StorageUsageCallback; |
44 | 46 |
45 class DeprecatedStorageQuota : public RefCounted<DeprecatedStorageQuota>, public ScriptWrappable { | 47 class DeprecatedStorageQuota : public RefCountedWillBeGarbageCollectedFinalized< DeprecatedStorageQuota>, public ScriptWrappable { |
48 DECLARE_GC_INFO; | |
46 public: | 49 public: |
47 enum Type { | 50 enum Type { |
48 Temporary, | 51 Temporary, |
49 Persistent, | 52 Persistent, |
50 }; | 53 }; |
51 | 54 |
52 static PassRefPtr<DeprecatedStorageQuota> create(Type type) | 55 static PassRefPtrWillBeRawPtr<DeprecatedStorageQuota> create(Type type) |
53 { | 56 { |
54 return adoptRef(new DeprecatedStorageQuota(type)); | 57 return adoptRefWillBeNoop(new DeprecatedStorageQuota(type)); |
55 } | 58 } |
56 | 59 |
57 void queryUsageAndQuota(ExecutionContext*, PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>); | 60 void queryUsageAndQuota(ExecutionContext*, PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>); |
58 | 61 |
59 void requestQuota(ExecutionContext*, unsigned long long newQuotaInBytes, Pas sOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>); | 62 void requestQuota(ExecutionContext*, unsigned long long newQuotaInBytes, Pas sOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>); |
60 | 63 |
61 ~DeprecatedStorageQuota(); | 64 ~DeprecatedStorageQuota() { } |
tkent
2014/02/10 08:27:40
Ditto.
sof
2014/02/10 09:07:19
Reverted.
| |
65 | |
66 void trace(Visitor*) { } | |
62 | 67 |
63 private: | 68 private: |
64 explicit DeprecatedStorageQuota(Type); | 69 explicit DeprecatedStorageQuota(Type); |
65 Type m_type; | 70 Type m_type; |
66 }; | 71 }; |
67 | 72 |
73 USED_FROM_MULTIPLE_THREADS(DeprecatedStorageQuota); | |
74 | |
68 } // namespace WebCore | 75 } // namespace WebCore |
69 | 76 |
70 #endif // DeprecatedStorageQuota_h | 77 #endif // DeprecatedStorageQuota_h |
OLD | NEW |