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

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

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.h
diff --git a/mojo/public/cpp/bindings/lib/router.h b/mojo/public/cpp/bindings/lib/router.h
index 220af7d0ddc831964bf03e6fe5cac47a4ed62ef9..4c9687ae0ac0983efc2191b86ad45159836dfb7e 100644
--- a/mojo/public/cpp/bindings/lib/router.h
+++ b/mojo/public/cpp/bindings/lib/router.h
@@ -9,15 +9,16 @@
#include "mojo/public/cpp/bindings/lib/connector.h"
#include "mojo/public/cpp/bindings/lib/shared_data.h"
+#include "mojo/public/cpp/bindings/lib/validator_chain.h"
namespace mojo {
namespace internal {
class Router : public MessageReceiver {
public:
- // The Router takes ownership of |message_pipe|.
- explicit Router(ScopedMessagePipeHandle message_pipe,
- MojoAsyncWaiter* waiter = GetDefaultAsyncWaiter());
+ Router(ScopedMessagePipeHandle message_pipe,
+ ValidatorChain validators,
darin (slow to review) 2014/05/12 17:28:26 hmm, instead of passing the validator chain to Rou
yzshen1 2014/05/12 21:59:58 We not only need to validate messages received by
+ MojoAsyncWaiter* waiter = GetDefaultAsyncWaiter());
virtual ~Router();
// Sets the receiver to handle messages read from the message pipe that do
@@ -74,10 +75,11 @@ class Router : public MessageReceiver {
bool HandleIncomingMessage(Message* message);
+ HandleIncomingMessageThunk thunk_;
+ ValidatorChain validators_;
Connector connector_;
SharedData<Router*> weak_self_;
MessageReceiver* incoming_receiver_;
- HandleIncomingMessageThunk thunk_;
ResponderMap responders_;
uint64_t next_request_id_;
};

Powered by Google App Engine
This is Rietveld 408576698