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

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

Issue 2244363003: Mojo C++ bindings: disallow copy and assign for generated classes when necessary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: the actual fix Created 4 years, 4 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/wrapper_class_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
index 9ba7afd4bfa3da75ecddf913d38d4b771079fc07..c72c1fae132176c227f019331d3c070f331aa53d 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
@@ -75,5 +75,10 @@ class {{export_attribute}} {{struct.name}} {
{%- set name = field.name %}
{{type}} {{name}};
{%- endfor %}
+
+{%- if struct|contains_move_only_members %}
+ private:
+ DISALLOW_COPY_AND_ASSIGN({{struct.name}});
+{%- endif %}
};
« no previous file with comments | « mojo/public/interfaces/bindings/tests/test_export.mojom ('k') | mojo/public/tools/bindings/generators/mojom_cpp_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698