diff options
author | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-06 11:58:59 +0000 |
---|---|---|
committer | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-06 11:58:59 +0000 |
commit | 45868f07b82abd9af666ed727a7bb406b54fb902 (patch) | |
tree | 4915405900712f1a964777757de18a6708a3813f /content/child | |
parent | cca964332a964fd7e4efb7056612217b11f15ac7 (diff) | |
download | chromium_src-45868f07b82abd9af666ed727a7bb406b54fb902.zip chromium_src-45868f07b82abd9af666ed727a7bb406b54fb902.tar.gz chromium_src-45868f07b82abd9af666ed727a7bb406b54fb902.tar.bz2 |
Quota: Remove ifdef macros used for callback cleanup
Depends on: https://codereview.chromium.org/135723009/
BUG=338995
TEST=compile
Review URL: https://codereview.chromium.org/155283003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child')
-rw-r--r-- | content/child/quota_dispatcher.cc | 19 | ||||
-rw-r--r-- | content/child/quota_dispatcher.h | 11 |
2 files changed, 5 insertions, 25 deletions
diff --git a/content/child/quota_dispatcher.cc b/content/child/quota_dispatcher.cc index 22d9201..ff762ed 100644 --- a/content/child/quota_dispatcher.cc +++ b/content/child/quota_dispatcher.cc @@ -11,6 +11,7 @@ #include "content/child/quota_message_filter.h" #include "content/child/thread_safe_sender.h" #include "content/common/quota_messages.h" +#include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" #include "third_party/WebKit/public/platform/WebStorageQuotaType.h" #include "url/gurl.h" @@ -34,11 +35,10 @@ namespace { class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { public: explicit WebStorageQuotaDispatcherCallback( - blink::WebStorageQuotaCallbacksType callback) + blink::WebStorageQuotaCallbacks callback) : callbacks_(callback) {} virtual ~WebStorageQuotaDispatcherCallback() {} -#ifdef NON_SELFDESTRUCT_WEBSTORAGEQUOTACALLBACKS virtual void DidQueryStorageUsageAndQuota(int64 usage, int64 quota) OVERRIDE { callbacks_.didQueryStorageUsageAndQuota(usage, quota); } @@ -48,20 +48,9 @@ class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { virtual void DidFail(quota::QuotaStatusCode error) OVERRIDE { callbacks_.didFail(static_cast<WebStorageQuotaError>(error)); } -#else - virtual void DidQueryStorageUsageAndQuota(int64 usage, int64 quota) OVERRIDE { - callbacks_->didQueryStorageUsageAndQuota(usage, quota); - } - virtual void DidGrantStorageQuota(int64 usage, int64 granted_quota) OVERRIDE { - callbacks_->didGrantStorageQuota(usage, granted_quota); - } - virtual void DidFail(quota::QuotaStatusCode error) OVERRIDE { - callbacks_->didFail(static_cast<WebStorageQuotaError>(error)); - } -#endif private: - blink::WebStorageQuotaCallbacksType callbacks_; + blink::WebStorageQuotaCallbacks callbacks_; DISALLOW_COPY_AND_ASSIGN(WebStorageQuotaDispatcherCallback); }; @@ -147,7 +136,7 @@ void QuotaDispatcher::RequestStorageQuota( // static QuotaDispatcher::Callback* QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper( - blink::WebStorageQuotaCallbacksType callbacks) { + blink::WebStorageQuotaCallbacks callbacks) { return new WebStorageQuotaDispatcherCallback(callbacks); } diff --git a/content/child/quota_dispatcher.h b/content/child/quota_dispatcher.h index 482e46f..000777f 100644 --- a/content/child/quota_dispatcher.h +++ b/content/child/quota_dispatcher.h @@ -11,7 +11,6 @@ #include "base/basictypes.h" #include "base/id_map.h" #include "base/memory/ref_counted.h" -#include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" #include "webkit/child/worker_task_runner.h" #include "webkit/common/quota/quota_types.h" @@ -23,14 +22,6 @@ class Message; namespace blink { class WebStorageQuotaCallbacks; - -// TODO(nhiroki): Remove this after a Blink-side patch is landed. -// (http://crbug.com/338995) -#ifdef NON_SELFDESTRUCT_WEBSTORAGEQUOTACALLBACKS -typedef WebStorageQuotaCallbacks WebStorageQuotaCallbacksType; -#else -typedef WebStorageQuotaCallbacks* WebStorageQuotaCallbacksType; -#endif } namespace content { @@ -78,7 +69,7 @@ class QuotaDispatcher : public webkit_glue::WorkerTaskRunner::Observer { // Creates a new Callback instance for WebStorageQuotaCallbacks. static Callback* CreateWebStorageQuotaCallbacksWrapper( - blink::WebStorageQuotaCallbacksType callbacks); + blink::WebStorageQuotaCallbacks callbacks); private: // Message handlers. |