Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1489)

Unified Diff: Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp

Issue 20262003: Use Platform::queryUsageAndQuota and deprecate WebFrameClient::queryUsageAndQuota (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/quota/WebStorageQuotaCallbacksImpl.h ('k') | Source/web/StorageQuotaChromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp
diff --git a/Source/web/WebStorageQuotaCallbacksImpl.cpp b/Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp
similarity index 81%
rename from Source/web/WebStorageQuotaCallbacksImpl.cpp
rename to Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp
index b1e9da61c1092169c73c108fcbd6bbe2d6eea443..574703edbb86841e98b7ac7904d40ca2085c9cc9 100644
--- a/Source/web/WebStorageQuotaCallbacksImpl.cpp
+++ b/Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp
@@ -29,25 +29,20 @@
*/
#include "config.h"
-#include "WebStorageQuotaCallbacksImpl.h"
+#include "modules/quota/WebStorageQuotaCallbacksImpl.h"
#include "core/dom/DOMError.h"
#include "core/dom/ExceptionCode.h"
-#include "modules/quota/StorageErrorCallback.h"
-#include "modules/quota/StorageQuotaCallback.h"
-#include "modules/quota/StorageUsageCallback.h"
-using namespace WebCore;
+namespace WebCore {
-namespace WebKit {
-
-WebStorageQuotaCallbacksImpl::WebStorageQuotaCallbacksImpl(PassRefPtr<WebCore::StorageUsageCallback> usageCallback, PassRefPtr<WebCore::StorageErrorCallback> errorCallback)
+WebStorageQuotaCallbacksImpl::WebStorageQuotaCallbacksImpl(PassRefPtr<StorageUsageCallback> usageCallback, PassRefPtr<StorageErrorCallback> errorCallback)
: m_usageCallback(usageCallback)
, m_errorCallback(errorCallback)
{
}
-WebStorageQuotaCallbacksImpl::WebStorageQuotaCallbacksImpl(PassRefPtr<WebCore::StorageQuotaCallback> quotaCallback, PassRefPtr<WebCore::StorageErrorCallback> errorCallback)
+WebStorageQuotaCallbacksImpl::WebStorageQuotaCallbacksImpl(PassRefPtr<StorageQuotaCallback> quotaCallback, PassRefPtr<StorageErrorCallback> errorCallback)
: m_quotaCallback(quotaCallback)
, m_errorCallback(errorCallback)
{
@@ -59,23 +54,23 @@ WebStorageQuotaCallbacksImpl::~WebStorageQuotaCallbacksImpl()
void WebStorageQuotaCallbacksImpl::didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes)
{
+ OwnPtr<WebStorageQuotaCallbacksImpl> deleter = adoptPtr(this);
if (m_usageCallback)
m_usageCallback->handleEvent(usageInBytes, quotaInBytes);
- delete this;
}
void WebStorageQuotaCallbacksImpl::didGrantStorageQuota(unsigned long long grantedQuotaInBytes)
{
+ OwnPtr<WebStorageQuotaCallbacksImpl> deleter = adoptPtr(this);
if (m_quotaCallback)
m_quotaCallback->handleEvent(grantedQuotaInBytes);
- delete this;
}
-void WebStorageQuotaCallbacksImpl::didFail(WebStorageQuotaError error)
+void WebStorageQuotaCallbacksImpl::didFail(WebKit::WebStorageQuotaError error)
{
+ OwnPtr<WebStorageQuotaCallbacksImpl> deleter = adoptPtr(this);
if (m_errorCallback)
m_errorCallback->handleEvent(DOMError::create(static_cast<ExceptionCode>(error)).get());
- delete this;
}
-} // namespace WebKit
+} // namespace WebCore
« no previous file with comments | « Source/modules/quota/WebStorageQuotaCallbacksImpl.h ('k') | Source/web/StorageQuotaChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698