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

Unified Diff: Source/platform/exported/WebStorageQuotaCallbacks.cpp

Issue 676183002: Oilpan: simplify quota storage callbacks objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/platform/StorageQuotaCallbacks.h ('k') | Source/web/StorageQuotaClientImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « Source/platform/StorageQuotaCallbacks.h ('k') | Source/web/StorageQuotaClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698