Chromium Code Reviews| 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 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" | |
| 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 { |
|
haraken
2014/02/10 01:34:58
Isn't USED_FROM_MULTIPLE_THREADS(DeprecatedStorage
sof
2014/02/10 07:35:12
It shouldn't be needed, as there are no Deprecated
haraken
2014/02/10 07:42:14
Thanks, but would you add USED_FROM_MULTIPLE_THREA
sof
2014/02/10 07:57:41
I would clearly add it if that's a possibility, bu
haraken
2014/02/10 08:15:23
I'm sorry, if it's on window, it shouldn't be touc
| |
| 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() { } |
| 66 | |
| 67 void trace(Visitor*); | |
| 64 | 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 |
| OLD | NEW |