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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl

Issue 289333002: Mojo cpp bindings: validation logic for incoming messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes according to Tom's suggestions 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/tools/bindings/generators/cpp_templates/struct_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl
index 701ad333f1bf9072b8dfdce25f83336d749c87ea..deb3732d4aad406f24c31450acc224c090e3ad11 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl
@@ -7,6 +7,9 @@ class {{class_name}} {
static {{class_name}}* New(mojo::Buffer* buf, mojo::Buffer::Destructor dtor = NULL);
+ static bool Validate(const void* data,
+ mojo::internal::BoundsChecker* bounds_checker);
+
{#--- Setters -#}
{{ struct_macros.setters(struct) }}

Powered by Google App Engine
This is Rietveld 408576698