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

Unified Diff: content/child/child_thread_impl.cc

Issue 2000113002: Delegate WebSocket message handlers to the loading task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment Created 4 years, 7 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/child_thread_impl.h ('k') | content/child/websocket_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 0b5a69168c708b5c425758bc05c149bd00698ba1..b7a29c73c970dd18505d126130376862322dd958 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -51,6 +51,7 @@
#include "content/child/service_worker/service_worker_message_filter.h"
#include "content/child/thread_safe_sender.h"
#include "content/child/websocket_dispatcher.h"
+#include "content/child/websocket_message_filter.h"
#include "content/common/child_process_messages.h"
#include "content/common/in_process_child_thread_params.h"
#include "content/common/mojo/mojo_shell_connection_impl.h"
@@ -431,12 +432,16 @@ void ChildThreadImpl::Init(const Options& options) {
new NotificationDispatcher(thread_safe_sender_.get());
push_dispatcher_ = new PushDispatcher(thread_safe_sender_.get());
+ websocket_message_filter_ =
+ new WebSocketMessageFilter(websocket_dispatcher_.get());
+
channel_->AddFilter(histogram_message_filter_.get());
channel_->AddFilter(resource_message_filter_.get());
channel_->AddFilter(quota_message_filter_->GetFilter());
channel_->AddFilter(notification_dispatcher_->GetFilter());
channel_->AddFilter(push_dispatcher_->GetFilter());
channel_->AddFilter(service_worker_message_filter_->GetFilter());
+ channel_->AddFilter(websocket_message_filter_.get());
if (!IsInBrowserProcess()) {
// In single process mode, browser-side tracing and memory will cover the
@@ -618,8 +623,6 @@ bool ChildThreadImpl::OnMessageReceived(const IPC::Message& msg) {
// Resource responses are sent to the resource dispatcher.
if (resource_dispatcher_->OnMessageReceived(msg))
return true;
- if (websocket_dispatcher_->OnMessageReceived(msg))
- return true;
if (file_system_dispatcher_->OnMessageReceived(msg))
return true;
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/child/websocket_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698