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

Unified Diff: trunk/src/content/child/quota_dispatcher.h

Issue 21042002: Revert 214162 "Make Platform::queryStorageUsageAndQuota work fro..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | « trunk/src/content/child/child_thread.cc ('k') | trunk/src/content/child/quota_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/child/quota_dispatcher.h
===================================================================
--- trunk/src/content/child/quota_dispatcher.h (revision 214171)
+++ trunk/src/content/child/quota_dispatcher.h (working copy)
@@ -10,8 +10,7 @@
#include "base/basictypes.h"
#include "base/id_map.h"
-#include "base/memory/ref_counted.h"
-#include "webkit/child/worker_task_runner.h"
+#include "ipc/ipc_listener.h"
#include "webkit/common/quota/quota_types.h"
class GURL;
@@ -26,14 +25,10 @@
namespace content {
-class ThreadSafeSender;
-class QuotaMessageFilter;
-
// Dispatches and sends quota related messages sent to/from a child
// process from/to the main browser process. There is one instance
-// per each thread. Thread-specific instance can be obtained by
-// ThreadSpecificInstance().
-class QuotaDispatcher : public webkit_glue::WorkerTaskRunner::Observer {
+// per child process. Messages are dispatched on the main child thread.
+class QuotaDispatcher : public IPC::Listener {
public:
class Callback {
public:
@@ -43,21 +38,12 @@
virtual void DidFail(quota::QuotaStatusCode status) = 0;
};
- QuotaDispatcher(ThreadSafeSender* thread_safe_sender,
- QuotaMessageFilter* quota_message_filter);
+ QuotaDispatcher();
virtual ~QuotaDispatcher();
- // |thread_safe_sender| and |quota_message_filter| are used if
- // calling this leads to construction.
- static QuotaDispatcher* ThreadSpecificInstance(
- ThreadSafeSender* thread_safe_sender,
- QuotaMessageFilter* quota_message_filter);
+ // IPC::Listener implementation.
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
- // webkit_glue::WorkerTaskRunner::Observer implementation.
- virtual void OnWorkerRunLoopStopped() OVERRIDE;
-
- void OnMessageReceived(const IPC::Message& msg);
-
void QueryStorageUsageAndQuota(const GURL& gurl,
quota::StorageType type,
Callback* callback);
@@ -78,14 +64,10 @@
int64 current_quota);
void DidGrantStorageQuota(int request_id,
int64 granted_quota);
- void DidFail(int request_id,
- quota::QuotaStatusCode error);
+ void DidFail(int request_id, quota::QuotaStatusCode error);
IDMap<Callback, IDMapOwnPointer> pending_quota_callbacks_;
- scoped_refptr<ThreadSafeSender> thread_safe_sender_;
- scoped_refptr<QuotaMessageFilter> quota_message_filter_;
-
DISALLOW_COPY_AND_ASSIGN(QuotaDispatcher);
};
« no previous file with comments | « trunk/src/content/child/child_thread.cc ('k') | trunk/src/content/child/quota_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698