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

Unified Diff: content/child/quota_message_filter.h

Issue 892543002: workers: Introduce a WorkerMessageFilter to ease routing/processing worker messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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 | « content/child/push_messaging/push_provider.h ('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 b13e705e9205ea72e5584a31e5ecce66559b8829..d613584920116ba354bfac7852a9b94da07665fe 100644
--- a/content/child/quota_message_filter.h
+++ b/content/child/quota_message_filter.h
@@ -7,19 +7,12 @@
#include <map>
-#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "content/child/child_message_filter.h"
-
-namespace base {
-class MessageLoopProxy;
-}
+#include "content/child/worker_thread_message_filter.h"
namespace content {
-class ThreadSafeSender;
-
-class QuotaMessageFilter : public ChildMessageFilter {
+class QuotaMessageFilter : public WorkerThreadMessageFilter {
public:
explicit QuotaMessageFilter(ThreadSafeSender* thread_safe_sender);
@@ -35,16 +28,14 @@ class QuotaMessageFilter : public ChildMessageFilter {
~QuotaMessageFilter() override;
private:
- // ChildMessageFilter implementation:
- base::TaskRunner* OverrideTaskRunnerForMessage(
- const IPC::Message& msg) override;
- bool OnMessageReceived(const IPC::Message& msg) override;
+ // WorkerThreadMessageFilter:
+ bool ShouldHandleMessage(const IPC::Message& msg) const override;
+ void OnFilteredMessageReceived(const IPC::Message& msg) override;
+ bool GetWorkerThreadIdForMessage(const IPC::Message& msg,
+ int* ipc_thread_id) override;
typedef std::map<int, int> RequestIdToThreadId;
- scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
- scoped_refptr<ThreadSafeSender> thread_safe_sender_;
-
base::Lock request_id_map_lock_;
RequestIdToThreadId request_id_map_;
int next_request_id_;
« no previous file with comments | « content/child/push_messaging/push_provider.h ('k') | content/child/quota_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698