Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / quota / DeprecatedStorageQuota.cpp
index 48ba77f..7807ed0 100644 (file)
 
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/ExecutionContext.h"
-#include "modules/quota/DeprecatedWebStorageQuotaCallbacksImpl.h"
+#include "modules/quota/DeprecatedStorageQuotaCallbacksImpl.h"
 #include "modules/quota/StorageErrorCallback.h"
 #include "modules/quota/StorageQuotaClient.h"
 #include "modules/quota/StorageUsageCallback.h"
+#include "platform/StorageQuotaCallbacks.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
 #include "public/platform/Platform.h"
@@ -45,6 +46,8 @@
 
 namespace WebCore {
 
+DEFINE_GC_INFO(DeprecatedStorageQuota);
+
 DeprecatedStorageQuota::DeprecatedStorageQuota(Type type)
     : m_type(type)
 {
@@ -69,7 +72,8 @@ void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionConte
     }
 
     KURL storagePartition = KURL(KURL(), securityOrigin->toString());
-    blink::Platform::current()->queryStorageUsageAndQuota(storagePartition, storageType, DeprecatedWebStorageQuotaCallbacksImpl::createLeakedPtr(successCallback, errorCallback));
+    OwnPtr<StorageQuotaCallbacks> callbacks = DeprecatedStorageQuotaCallbacksImpl::create(successCallback, errorCallback);
+    blink::Platform::current()->queryStorageUsageAndQuota(storagePartition, storageType, callbacks.release());
 }
 
 void DeprecatedStorageQuota::requestQuota(ExecutionContext* executionContext, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback> successCallback, PassOwnPtr<StorageErrorCallback> errorCallback)