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

Unified Diff: mojo/public/cpp/bindings/lib/router.cc

Issue 273233002: Mojo cpp bindings: add support for validating incoming messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto the InterfacePtr change Created 6 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
Index: mojo/public/cpp/bindings/lib/router.cc
diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
index ec68bba9459bf2b73754a9ee1ec648022ebb1227..212787d534e40e696bf4016642689e13294e4fe4 100644
--- a/mojo/public/cpp/bindings/lib/router.cc
+++ b/mojo/public/cpp/bindings/lib/router.cc
@@ -62,13 +62,17 @@ bool Router::HandleIncomingMessageThunk::AcceptWithResponder(
// ----------------------------------------------------------------------------
-Router::Router(ScopedMessagePipeHandle message_pipe, MojoAsyncWaiter* waiter)
- : connector_(message_pipe.Pass(), waiter),
+Router::Router(ScopedMessagePipeHandle message_pipe,
+ ValidatorChain validators,
+ MojoAsyncWaiter* waiter)
+ : thunk_(this),
+ validators_(validators.Pass()),
+ connector_(message_pipe.Pass(), waiter),
weak_self_(this),
incoming_receiver_(NULL),
- thunk_(this),
next_request_id_(0) {
- connector_.set_incoming_receiver(&thunk_);
+ validators_.set_sink(&thunk_);
+ connector_.set_incoming_receiver(validators_.GetHead());
darin (slow to review) 2014/05/12 17:39:11 Oh, I see an issue with my suggestion. Router want
}
Router::~Router() {

Powered by Google App Engine
This is Rietveld 408576698