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

Unified Diff: ipc/ipc_mojo_bootstrap.cc

Issue 2276043002: Support custom message filtering on Mojo binding objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 4 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 | « no previous file | mojo/public/cpp/bindings/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_mojo_bootstrap.cc
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc
index 662b422af8a7bf48309fbeef10071d55ad62cd1a..24c14644a4bd138ed04ace3f5940d95596367219 100644
--- a/ipc/ipc_mojo_bootstrap.cc
+++ b/ipc/ipc_mojo_bootstrap.cc
@@ -48,14 +48,15 @@ class ChannelAssociatedGroupController
: task_runner_(ipc_task_runner),
proxy_task_runner_(base::ThreadTaskRunnerHandle::Get()),
set_interface_id_namespace_bit_(set_interface_id_namespace_bit),
- header_validator_(
- "IPC::mojom::Bootstrap [master] MessageHeaderValidator", this),
+ filters_(this),
control_message_handler_(this),
control_message_proxy_thunk_(this),
control_message_proxy_(&control_message_proxy_thunk_) {
thread_checker_.DetachFromThread();
control_message_handler_.SetDescription(
"IPC::mojom::Bootstrap [master] PipeControlMessageHandler");
+ filters_.Append<mojo::MessageHeaderValidator>(
+ "IPC::mojom::Bootstrap [master] MessageHeaderValidator");
}
void Bind(mojo::ScopedMessagePipeHandle handle) {
@@ -65,7 +66,7 @@ class ChannelAssociatedGroupController
connector_.reset(new mojo::Connector(
std::move(handle), mojo::Connector::SINGLE_THREADED_SEND,
task_runner_));
- connector_->set_incoming_receiver(&header_validator_);
+ connector_->set_incoming_receiver(&filters_);
connector_->set_connection_error_handler(
base::Bind(&ChannelAssociatedGroupController::OnPipeError,
base::Unretained(this)));
@@ -752,7 +753,7 @@ class ChannelAssociatedGroupController
scoped_refptr<base::SingleThreadTaskRunner> proxy_task_runner_;
const bool set_interface_id_namespace_bit_;
std::unique_ptr<mojo::Connector> connector_;
- mojo::MessageHeaderValidator header_validator_;
+ mojo::FilterChain filters_;
mojo::PipeControlMessageHandler control_message_handler_;
ControlMessageProxyThunk control_message_proxy_thunk_;
mojo::PipeControlMessageProxy control_message_proxy_;
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698