summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h')
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h38
1 files changed, 12 insertions, 26 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h b/chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h
index 6ac7b55c764..8244f9f1be2 100644
--- a/chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h
+++ b/chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -32,43 +32,29 @@
#define StorageInfo_h
#include "bindings/v8/ScriptWrappable.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
+#include "platform/heap/Handle.h"
namespace WebCore {
-class ExecutionContext;
-class StorageErrorCallback;
-class StorageQuota;
-class StorageQuotaCallback;
-class StorageUsageCallback;
-
-class StorageInfo : public RefCounted<StorageInfo>, public ScriptWrappable {
+class StorageInfo FINAL : public GarbageCollectedFinalized<StorageInfo>, public ScriptWrappable {
public:
- enum {
- TEMPORARY,
- PERSISTENT,
- };
-
- static PassRefPtr<StorageInfo> create()
+ static StorageInfo* create(unsigned long long usage, unsigned long long quota)
{
- return adoptRef(new StorageInfo());
+ return new StorageInfo(usage, quota);
}
- void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>);
-
- void requestQuota(ExecutionContext*, int storageType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>);
+ unsigned long long usage() const { return m_usage; }
+ unsigned long long quota() const { return m_quota; }
~StorageInfo();
-private:
- StorageInfo();
+ void trace(Visitor*) { }
- StorageQuota* getStorageQuota(int storageType);
+private:
+ StorageInfo(unsigned long long usage, unsigned long long quota);
- mutable RefPtr<StorageQuota> m_temporaryStorage;
- mutable RefPtr<StorageQuota> m_persistentStorage;
+ unsigned long long m_usage;
+ unsigned long long m_quota;
};
} // namespace WebCore