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

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..6e56b7f0ad92217dd9333f9c519f4516c1ccc3ac 100644
--- a/mojo/public/cpp/bindings/lib/message_header_validator.h
+++ b/mojo/public/cpp/bindings/lib/message_header_validator.h
@@ -14,8 +14,17 @@ namespace internal {
class MessageHeaderValidator : public MessageFilter {
public:
explicit MessageHeaderValidator(MessageReceiver* sink = nullptr);
+ MessageHeaderValidator(const std::string& description,
+ MessageReceiver* sink = nullptr);
+
+ // Sets the description associated with this validator. Used for reporting
+ // more detailed validation errors.
+ void SetDescription(const std::string& description);
bool Accept(Message* message) override;
+
+ private:
+ std::string description_;
};
} // namespace internal
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_buffer.cc ('k') | mojo/public/cpp/bindings/lib/message_header_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698