Index: Source/platform/exported/WebStorageQuotaCallbacks.cpp |
diff --git a/Source/platform/exported/WebStorageQuotaCallbacks.cpp b/Source/platform/exported/WebStorageQuotaCallbacks.cpp |
index 3ae4f6569c9a78f727d30491ed1df30291be4634..93c5a7b57bba64f062535f94c992a1f104675143 100644 |
--- a/Source/platform/exported/WebStorageQuotaCallbacks.cpp |
+++ b/Source/platform/exported/WebStorageQuotaCallbacks.cpp |
@@ -6,38 +6,12 @@ |
#include "public/platform/WebStorageQuotaCallbacks.h" |
#include "platform/StorageQuotaCallbacks.h" |
-#include "wtf/Forward.h" |
-#include "wtf/OwnPtr.h" |
-#include "wtf/PassOwnPtr.h" |
-#include "wtf/PassRefPtr.h" |
-#include "wtf/RefCounted.h" |
namespace blink { |
-class WebStorageQuotaCallbacksPrivate final : public RefCountedWillBeGarbageCollected<WebStorageQuotaCallbacksPrivate> { |
-public: |
- static PassRefPtrWillBeRawPtr<WebStorageQuotaCallbacksPrivate> create(const PassOwnPtrWillBeRawPtr<StorageQuotaCallbacks>& callbacks) |
- { |
- return adoptRefWillBeNoop(new WebStorageQuotaCallbacksPrivate(callbacks)); |
- } |
- |
- void trace(Visitor*); |
- |
- StorageQuotaCallbacks* callbacks() { return m_callbacks.get(); } |
- |
-private: |
- WebStorageQuotaCallbacksPrivate(const PassOwnPtrWillBeRawPtr<StorageQuotaCallbacks>& callbacks) : m_callbacks(callbacks) { } |
- OwnPtrWillBeMember<StorageQuotaCallbacks> m_callbacks; |
-}; |
- |
-void WebStorageQuotaCallbacksPrivate::trace(Visitor* visitor) |
-{ |
- visitor->trace(m_callbacks); |
-} |
- |
-WebStorageQuotaCallbacks::WebStorageQuotaCallbacks(const PassOwnPtrWillBeRawPtr<StorageQuotaCallbacks>& callbacks) |
+WebStorageQuotaCallbacks::WebStorageQuotaCallbacks(StorageQuotaCallbacks* callbacks) |
+ : m_private(callbacks) |
{ |
- m_private = WebStorageQuotaCallbacksPrivate::create(callbacks); |
} |
void WebStorageQuotaCallbacks::reset() |
@@ -53,21 +27,21 @@ void WebStorageQuotaCallbacks::assign(const WebStorageQuotaCallbacks& other) |
void WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes) |
{ |
ASSERT(!m_private.isNull()); |
- m_private->callbacks()->didQueryStorageUsageAndQuota(usageInBytes, quotaInBytes); |
+ m_private->didQueryStorageUsageAndQuota(usageInBytes, quotaInBytes); |
m_private.reset(); |
} |
void WebStorageQuotaCallbacks::didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes) |
{ |
ASSERT(!m_private.isNull()); |
- m_private->callbacks()->didGrantStorageQuota(usageInBytes, grantedQuotaInBytes); |
+ m_private->didGrantStorageQuota(usageInBytes, grantedQuotaInBytes); |
m_private.reset(); |
} |
void WebStorageQuotaCallbacks::didFail(WebStorageQuotaError error) |
{ |
ASSERT(!m_private.isNull()); |
- m_private->callbacks()->didFail(error); |
+ m_private->didFail(error); |
m_private.reset(); |
} |