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

Unified Diff: content/child/quota_message_filter.h

Issue 63843002: Add ChildMessageFilter, a base class for renderer/worker cross-thread MessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RemoveFilter fix Created 7 years, 1 month 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 | « content/child/indexed_db/indexed_db_message_filter.cc ('k') | content/child/quota_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/quota_message_filter.h
diff --git a/content/child/quota_message_filter.h b/content/child/quota_message_filter.h
index eba63137dfe451b038281ae31f87d8008a9c7e95..eabff1bf8ca727a74c5d682714fe60436018f1ae 100644
--- a/content/child/quota_message_filter.h
+++ b/content/child/quota_message_filter.h
@@ -8,7 +8,7 @@
#include <map>
#include "base/synchronization/lock.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "content/child/child_message_filter.h"
namespace base {
class MessageLoopProxy;
@@ -18,13 +18,10 @@ namespace content {
class ThreadSafeSender;
-class QuotaMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class QuotaMessageFilter : public ChildMessageFilter {
public:
explicit QuotaMessageFilter(ThreadSafeSender* thread_safe_sender);
- // IPC::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
-
// Generates a new request_id, registers { request_id, thread_id } map to
// the message filter and returns the request_id.
// This method can be called on any thread.
@@ -37,9 +34,12 @@ class QuotaMessageFilter : public IPC::ChannelProxy::MessageFilter {
virtual ~QuotaMessageFilter();
private:
- typedef std::map<int, int> RequestIdToThreadId;
+ // ChildMessageFilter implementation:
+ virtual base::TaskRunner* OverrideTaskRunnerForMessage(
+ const IPC::Message& msg) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
- void DispatchMessage(const IPC::Message& msg);
+ typedef std::map<int, int> RequestIdToThreadId;
scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
« no previous file with comments | « content/child/indexed_db/indexed_db_message_filter.cc ('k') | content/child/quota_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698