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

Unified Diff: content/child/websocket_dispatcher.cc

Issue 1461283002: [DO NOT COMMIT] mojo datapipe performance measurement Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/websocket_dispatcher.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/websocket_dispatcher.cc
diff --git a/content/child/websocket_dispatcher.cc b/content/child/websocket_dispatcher.cc
index 13535eb51afe8602772eae28c6e901608980210d..603795d8d48950803a489c8ff38c00a1e8665fda 100644
--- a/content/child/websocket_dispatcher.cc
+++ b/content/child/websocket_dispatcher.cc
@@ -8,8 +8,10 @@
#include <map>
#include "base/logging.h"
+#include "content/child/child_thread_impl.h"
#include "content/child/websocket_bridge.h"
#include "content/common/websocket_messages.h"
+#include "content/public/common/service_registry.h"
#include "ipc/ipc_message.h"
#include "url/gurl.h"
@@ -17,7 +19,10 @@ namespace content {
WebSocketDispatcher::WebSocketDispatcher()
: channel_id_max_(0),
- weak_ptr_factory_(this) {}
+ weak_ptr_factory_(this) {
+ ServiceRegistry* registry = ChildThreadImpl::current()->service_registry();
+ registry->ConnectToRemoteService(mojo::GetProxy(&loader_test_service_));
+}
WebSocketDispatcher::~WebSocketDispatcher() {}
@@ -31,6 +36,9 @@ bool WebSocketDispatcher::CanHandleMessage(const IPC::Message& msg) {
case WebSocketMsg_FlowControl::ID:
case WebSocketMsg_DropChannel::ID:
case WebSocketMsg_NotifyClosing::ID:
+ case WebSocketMsg_LoaderTransferTest_SetDataBuffer::ID:
+ case WebSocketMsg_LoaderTransferTest_Ack::ID:
+ case WebSocketMsg_LoaderTransferTest_Done::ID:
return true;
default:
return false;
@@ -55,6 +63,7 @@ void WebSocketDispatcher::RemoveBridge(int channel_id) {
bool WebSocketDispatcher::OnMessageReceived(const IPC::Message& msg) {
if (!CanHandleMessage(msg))
return false;
+
WebSocketBridge* bridge = GetBridge(msg.routing_id(), msg.type());
if (!bridge)
return true;
« no previous file with comments | « content/child/websocket_dispatcher.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698