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

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

Issue 2064903002: Mojo: Report bindings validation errors via MojoNotifyBadMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
Index: mojo/public/cpp/bindings/lib/message_header_validator.h
diff --git a/mojo/public/cpp/bindings/lib/message_header_validator.h b/mojo/public/cpp/bindings/lib/message_header_validator.h
index bccef1f772a4cfa6184dff3b924f497c23c90cdc..b365691927decc3c23b14c1a5000f19bfa5a2da7 100644
--- a/mojo/public/cpp/bindings/lib/message_header_validator.h
+++ b/mojo/public/cpp/bindings/lib/message_header_validator.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_HEADER_VALIDATOR_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_HEADER_VALIDATOR_H_
+#include <string>
+
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/cpp/bindings/message_filter.h"
@@ -14,8 +16,16 @@ namespace internal {
class MessageHeaderValidator : public MessageFilter {
public:
explicit MessageHeaderValidator(MessageReceiver* sink = nullptr);
+ MessageHeaderValidator(MessageReceiver* sink, const std::string& debug_info);
+
+ void set_debug_info(const std::string& debug_info) {
+ debug_info_ = debug_info;
+ }
+
+ Result Accept(Message* message) override;
- bool Accept(Message* message) override;
+ private:
+ std::string debug_info_;
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698