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

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

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/StorageQuota.cpp ('k') | Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/quota/WebStorageQuotaCallbacksImpl.h
diff --git a/Source/web/WebStorageQuotaCallbacksImpl.h b/Source/modules/quota/WebStorageQuotaCallbacksImpl.h
similarity index 58%
rename from Source/web/WebStorageQuotaCallbacksImpl.h
rename to Source/modules/quota/WebStorageQuotaCallbacksImpl.h
index 9a81795d6c03fb823f9786d4377541823996981c..6c71dc2e4c05c83a61545bacc6acca05dc429f3f 100644
--- a/Source/web/WebStorageQuotaCallbacksImpl.h
+++ b/Source/modules/quota/WebStorageQuotaCallbacksImpl.h
@@ -31,37 +31,46 @@
#ifndef WebStorageQuotaCallbacksImpl_h
#define WebStorageQuotaCallbacksImpl_h
-#include "WebStorageQuotaCallbacks.h"
-#include "wtf/PassOwnPtr.h"
+#include "modules/quota/StorageErrorCallback.h"
+#include "modules/quota/StorageQuotaCallback.h"
+#include "modules/quota/StorageUsageCallback.h"
+#include "public/platform/WebStorageQuotaCallbacks.h"
+#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
namespace WebCore {
-class StorageErrorCallback;
-class StorageQuotaCallback;
-class StorageUsageCallback;
-}
-namespace WebKit {
-
-class WebStorageQuotaCallbacksImpl : public WebStorageQuotaCallbacks {
+class WebStorageQuotaCallbacksImpl : public WebKit::WebStorageQuotaCallbacks {
public:
- // The class is self-destructed and thus we have bare constructors.
- WebStorageQuotaCallbacksImpl(PassRefPtr<WebCore::StorageUsageCallback>, PassRefPtr<WebCore::StorageErrorCallback>);
- WebStorageQuotaCallbacksImpl(PassRefPtr<WebCore::StorageQuotaCallback>, PassRefPtr<WebCore::StorageErrorCallback>);
+ // The class is self-destructed and thus we have leakedPtr constructors.
+ static WebStorageQuotaCallbacksImpl* createLeakedPtr(PassRefPtr<StorageUsageCallback> success, PassRefPtr<StorageErrorCallback> error)
+ {
+ OwnPtr<WebStorageQuotaCallbacksImpl> callbacks = adoptPtr(new WebStorageQuotaCallbacksImpl(success, error));
+ return callbacks.leakPtr();
+ }
+
+ static WebStorageQuotaCallbacksImpl* createLeakedPtr(PassRefPtr<StorageQuotaCallback> success, PassRefPtr<StorageErrorCallback> error)
+ {
+ OwnPtr<WebStorageQuotaCallbacksImpl> callbacks = adoptPtr(new WebStorageQuotaCallbacksImpl(success, error));
+ return callbacks.leakPtr();
+ }
virtual ~WebStorageQuotaCallbacksImpl();
virtual void didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes);
virtual void didGrantStorageQuota(unsigned long long grantedQuotaInBytes);
- virtual void didFail(WebStorageQuotaError);
+ virtual void didFail(WebKit::WebStorageQuotaError);
private:
- RefPtr<WebCore::StorageUsageCallback> m_usageCallback;
- RefPtr<WebCore::StorageQuotaCallback> m_quotaCallback;
- RefPtr<WebCore::StorageErrorCallback> m_errorCallback;
+ WebStorageQuotaCallbacksImpl(PassRefPtr<StorageUsageCallback>, PassRefPtr<StorageErrorCallback>);
+ WebStorageQuotaCallbacksImpl(PassRefPtr<StorageQuotaCallback>, PassRefPtr<StorageErrorCallback>);
+
+ RefPtr<StorageUsageCallback> m_usageCallback;
+ RefPtr<StorageQuotaCallback> m_quotaCallback;
+ RefPtr<StorageErrorCallback> m_errorCallback;
};
-} // namespace WebKit
+} // namespace
#endif // WebStorageQuotaCallbacksImpl_h
« no previous file with comments | « Source/modules/quota/StorageQuota.cpp ('k') | Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698