summaryrefslogtreecommitdiff
path: root/Source/WebCore/storage/StorageMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/storage/StorageMap.h')
-rw-r--r--Source/WebCore/storage/StorageMap.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/Source/WebCore/storage/StorageMap.h b/Source/WebCore/storage/StorageMap.h
index 594c2d8c3..fcdcca434 100644
--- a/Source/WebCore/storage/StorageMap.h
+++ b/Source/WebCore/storage/StorageMap.h
@@ -23,11 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef StorageMap_h
-#define StorageMap_h
+#pragma once
#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
@@ -37,27 +35,28 @@ namespace WebCore {
class StorageMap : public RefCounted<StorageMap> {
public:
// Quota size measured in bytes.
- static PassRefPtr<StorageMap> create(unsigned quotaSize);
+ WEBCORE_EXPORT static Ref<StorageMap> create(unsigned quotaSize);
- unsigned length() const;
- String key(unsigned index);
- String getItem(const String&) const;
- PassRefPtr<StorageMap> setItem(const String& key, const String& value, String& oldValue, bool& quotaException);
- PassRefPtr<StorageMap> setItemIgnoringQuota(const String& key, const String& value);
- PassRefPtr<StorageMap> removeItem(const String&, String& oldValue);
+ WEBCORE_EXPORT unsigned length() const;
+ WEBCORE_EXPORT String key(unsigned index);
+ WEBCORE_EXPORT String getItem(const String&) const;
+ WEBCORE_EXPORT RefPtr<StorageMap> setItem(const String& key, const String& value, String& oldValue, bool& quotaException);
+ WEBCORE_EXPORT RefPtr<StorageMap> setItemIgnoringQuota(const String& key, const String& value);
+ WEBCORE_EXPORT RefPtr<StorageMap> removeItem(const String&, String& oldValue);
- bool contains(const String& key) const;
+ WEBCORE_EXPORT bool contains(const String& key) const;
- void importItems(const HashMap<String, String>&);
+ WEBCORE_EXPORT void importItems(const HashMap<String, String>&);
const HashMap<String, String>& items() const { return m_map; }
unsigned quota() const { return m_quotaSize; }
- static const unsigned noQuota = UINT_MAX;
+ WEBCORE_EXPORT Ref<StorageMap> copy();
+
+ static const constexpr unsigned noQuota = UINT_MAX;
private:
explicit StorageMap(unsigned quota);
- PassRefPtr<StorageMap> copy();
void invalidateIterator();
void setIteratorToIndex(unsigned);
@@ -70,5 +69,3 @@ private:
};
} // namespace WebCore
-
-#endif // StorageMap_h