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 24 matching lines...) Expand all Loading... |
35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
36 #include "core/dom/ExceptionCode.h" | 36 #include "core/dom/ExceptionCode.h" |
37 #include "core/dom/ExecutionContext.h" | 37 #include "core/dom/ExecutionContext.h" |
38 #include "modules/quota/DeprecatedStorageQuota.h" | 38 #include "modules/quota/DeprecatedStorageQuota.h" |
39 #include "modules/quota/StorageErrorCallback.h" | 39 #include "modules/quota/StorageErrorCallback.h" |
40 #include "modules/quota/StorageQuotaCallback.h" | 40 #include "modules/quota/StorageQuotaCallback.h" |
41 #include "modules/quota/StorageUsageCallback.h" | 41 #include "modules/quota/StorageUsageCallback.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
| 45 DEFINE_GC_INFO(DeprecatedStorageInfo); |
| 46 |
45 DeprecatedStorageInfo::DeprecatedStorageInfo() | 47 DeprecatedStorageInfo::DeprecatedStorageInfo() |
46 { | 48 { |
47 ScriptWrappable::init(this); | 49 ScriptWrappable::init(this); |
48 } | 50 } |
49 | 51 |
50 DeprecatedStorageInfo::~DeprecatedStorageInfo() | 52 DeprecatedStorageInfo::~DeprecatedStorageInfo() |
51 { | 53 { |
52 } | 54 } |
53 | 55 |
54 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr
<StorageErrorCallback> errorCallback) | 56 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr
<StorageErrorCallback> errorCallback) |
(...skipping 28 matching lines...) Expand all Loading... |
83 m_temporaryStorage = DeprecatedStorageQuota::create(DeprecatedStorag
eQuota::Temporary); | 85 m_temporaryStorage = DeprecatedStorageQuota::create(DeprecatedStorag
eQuota::Temporary); |
84 return m_temporaryStorage.get(); | 86 return m_temporaryStorage.get(); |
85 case PERSISTENT: | 87 case PERSISTENT: |
86 if (!m_persistentStorage) | 88 if (!m_persistentStorage) |
87 m_persistentStorage = DeprecatedStorageQuota::create(DeprecatedStora
geQuota::Persistent); | 89 m_persistentStorage = DeprecatedStorageQuota::create(DeprecatedStora
geQuota::Persistent); |
88 return m_persistentStorage.get(); | 90 return m_persistentStorage.get(); |
89 } | 91 } |
90 return 0; | 92 return 0; |
91 } | 93 } |
92 | 94 |
| 95 void DeprecatedStorageInfo::trace(Visitor* visitor) |
| 96 { |
| 97 visitor->trace(m_temporaryStorage); |
| 98 visitor->trace(m_persistentStorage); |
| 99 } |
| 100 |
93 } // namespace WebCore | 101 } // namespace WebCore |
OLD | NEW |