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

Issue 2083373002: proto_zero_plugin [NOT FOR REVIEW]. (Closed)

Created:
4 years, 6 months ago by kraynov
Modified:
4 years, 4 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, picksi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

proto_zero_plugin [NOT FOR REVIEW]. Temporary CL. Sample and canary will be removed from reviewable CL. BUG=

Patch Set 1 #

Patch Set 2 : refactoring #

Total comments: 34

Patch Set 3 : rebase #

Patch Set 4 : full_featured_will_split_into_smaller_CLs_for_review #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+743 lines, --1 lines) Patch
M components/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A components/proto_zero_plugin.gyp View 1 chunk +20 lines, -0 lines 0 comments Download
M components/tracing.gyp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
A components/tracing/proto_zero_plugin/BUILD.gn View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A + components/tracing/proto_zero_plugin/DEPS View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A components/tracing/proto_zero_plugin/proto_zero_generator.h View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
A components/tracing/proto_zero_plugin/proto_zero_generator.cc View 1 2 3 1 chunk +400 lines, -0 lines 6 comments Download
A components/tracing/proto_zero_plugin/proto_zero_plugin.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
A components/tracing/proto_zero_test/BUILD.gn View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A components/tracing/proto_zero_test/fake_runtime.h View 1 2 3 1 chunk +102 lines, -0 lines 0 comments Download
A components/tracing/proto_zero_test/mock_messages.proto View 1 2 3 1 chunk +60 lines, -0 lines 0 comments Download
A components/tracing/proto_zero_test/mock_messages_unittest.cc View 1 2 3 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
kraynov
4 years, 6 months ago (2016-06-22 14:11:26 UTC) #3
Primiano Tucci (use gerrit)
Had a first pass. Looks in a very good shape. I think you have pieces ...
4 years, 5 months ago (2016-07-05 11:30:18 UTC) #4
kraynov
Example of generated file (same as used for unit tests): // Autogenerated. DO NOT EDIT. ...
4 years, 5 months ago (2016-07-08 17:10:45 UTC) #5
Primiano Tucci (use gerrit)
4 years, 5 months ago (2016-07-11 16:52:07 UTC) #6
ok overall looks great. I'll have some more comments but at this point it's
worth splitting this into the official CLs.
Let's have a first CL where you just generate empty files (or maybe just the
ifdef guard) and then gradually enrich that.
I'll add my comments there.
Also I'll prepare a design doc in the meantime.

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
File components/tracing/proto_zero_plugin/proto_zero_generator.cc (right):

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
components/tracing/proto_zero_plugin/proto_zero_generator.cc:19: //
MessageDescriptor is a longer name but has more obvious meaning.
It also makes the class harder to codesearch. I'd stick with MessageDescriptor
(so just using google::protobuf::Descriptor)

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
components/tracing/proto_zero_plugin/proto_zero_generator.cc:44: for (const
EnumDescriptor* enumeration: enums_) {
you can drop the braces for single line for loops (and if-s)

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
components/tracing/proto_zero_plugin/proto_zero_generator.cc:54: std::string
GetFirstError() {
not sure you want to return this by copy. I think this should be a:
const std::string& GetFirstError() const

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
components/tracing/proto_zero_plugin/proto_zero_generator.cc:94: // Scanning
pass.
This comment doesn't say anything more than "Prepare". Either drop it or say
what it does. I'd just drop it as you have comments below.
Also I'd probably call it "Preprocess"

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
components/tracing/proto_zero_plugin/proto_zero_generator.cc:138: "#include
<inttypes.h>\n\n"
s/inttypes/stdint/

https://codereview.chromium.org/2083373002/diff/60001/components/tracing/prot...
components/tracing/proto_zero_plugin/proto_zero_generator.cc:144: // Print
namespaces.
add a blank newline before these comments. It makes code easier to read as it
clarifies which line the code belongs to.

Powered by Google App Engine
This is Rietveld 408576698