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

Issue 2694843003: Add field-initializing factory static methods to generated mojo unions. (Closed)

Created:
3 years, 10 months ago by Sam McNally
Modified:
3 years, 8 months ago
Reviewers:
yzshen1
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add field-initializing factory static methods to generated mojo unions. Review-Url: https://codereview.chromium.org/2694843003 Cr-Commit-Position: refs/heads/master@{#463167} Committed: https://chromium.googlesource.com/chromium/src/+/7dfe5a09c6622a2079b5cc94cfc0cd565e1c0601

Patch Set 1 : #

Patch Set 2 : rebase #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -113 lines) Patch
M mojo/public/cpp/bindings/BUILD.gn View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
D mojo/public/cpp/bindings/lib/union_accessor.h View 1 chunk +0 lines, -33 lines 0 comments Download
M mojo/public/cpp/bindings/tests/union_unittest.cc View 1 2 3 12 chunks +126 lines, -20 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_traits_definition.tmpl View 1 2 3 1 chunk +14 lines, -14 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl View 1 2 3 3 chunks +14 lines, -4 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl View 1 2 3 4 5 3 chunks +23 lines, -40 lines 0 comments Download

Messages

Total messages: 80 (68 generated)
Sam McNally
3 years, 9 months ago (2017-03-01 00:29:29 UTC) #27
Sam McNally
ping
3 years, 9 months ago (2017-03-06 00:39:47 UTC) #30
yzshen1
Sorry for late reply. I missed the notification mail at the beginning. (Please feel free ...
3 years, 9 months ago (2017-03-06 16:57:50 UTC) #31
Sam McNally
On 2017/03/06 16:57:50, yzshen1 wrote: > Sorry for late reply. I missed the notification mail ...
3 years, 9 months ago (2017-03-07 03:13:11 UTC) #32
yzshen1
On 2017/03/07 03:13:11, Sam McNally wrote: > On 2017/03/06 16:57:50, yzshen1 wrote: > > Sorry ...
3 years, 9 months ago (2017-03-07 05:05:48 UTC) #33
Sam McNally
On 2017/03/07 05:05:48, yzshen1 wrote: > On 2017/03/07 03:13:11, Sam McNally wrote: > > On ...
3 years, 9 months ago (2017-03-07 07:22:18 UTC) #47
yzshen1
https://codereview.chromium.org/2694843003/diff/200001/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl File mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl (right): https://codereview.chromium.org/2694843003/diff/200001/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl#newcode34 mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl:34: explicit {{union.name}}(Tag tag); With the current constructors, users would ...
3 years, 9 months ago (2017-03-07 17:13:43 UTC) #50
Sam McNally
I've changed this to add factory static methods to generated unions instead of constructors. PTAL.
3 years, 8 months ago (2017-04-07 06:43:27 UTC) #62
yzshen1
LGTM Thanks! https://codereview.chromium.org/2694843003/diff/260001/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl (right): https://codereview.chromium.org/2694843003/diff/260001/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl#newcode3 mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl:3: {%- if default_field.kind|is_string_kind or default_field.kind|is_object_kind or nit: ...
3 years, 8 months ago (2017-04-09 23:32:32 UTC) #65
Sam McNally
https://codereview.chromium.org/2694843003/diff/260001/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl (right): https://codereview.chromium.org/2694843003/diff/260001/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl#newcode3 mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl:3: {%- if default_field.kind|is_string_kind or default_field.kind|is_object_kind or On 2017/04/09 23:32:31, ...
3 years, 8 months ago (2017-04-10 00:31:31 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694843003/300001
3 years, 8 months ago (2017-04-10 02:47:42 UTC) #77
commit-bot: I haz the power
3 years, 8 months ago (2017-04-10 02:53:16 UTC) #80
Message was sent while issue was closed.
Committed patchset #6 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/7dfe5a09c6622a2079b5cc94cfc0...

Powered by Google App Engine
This is Rietveld 408576698