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

Issue 2968003005: Support Serializing and Deserializing RepeatedField / RepeatedPtrField in IPC::Message (Closed)

Created:
3 years, 5 months ago by Hzj_jie
Modified:
3 years, 5 months ago
CC:
chromium-reviews, cpu_(ooo_6.6-7.5), darin-cc_chromium.org, jam, xyzzyz
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Support Serializing and Deserializing RepeatedField / RepeatedPtrField in IPC::Message After this change, users can define a repeated field in protobuf, message Message { repeated <type> foo; } and use GetParamSize(sizer, p.foo()) WriteParam(m, p.foo()) and ReadParam(m, iter, r->mutable_foo()) to serialize and deserialize the field. Serializing and deserializing a RepeatedField / RepeatedPtrField are needed in change https://codereview.chromium.org/2964613002/. BUG=650926 Review-Url: https://codereview.chromium.org/2968003005 Cr-Commit-Position: refs/heads/master@{#487593} Committed: https://chromium.googlesource.com/chromium/src/+/84eef4fac4a6d97ac9dd0f05a8853f54116654ce

Patch Set 1 #

Total comments: 6

Patch Set 2 : Resolve review comments #

Patch Set 3 : Add IsPickleSizeSufficient function #

Patch Set 4 : Update IsPickleSizeSufficent to avoid GetSize #

Total comments: 6

Patch Set 5 : Resolve review comments #

Total comments: 10

Patch Set 6 : Resolve review comments #

Total comments: 2

Patch Set 7 : Resolve review comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -70 lines) Patch
M chrome/common/safe_browsing/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/safe_browsing/ipc_protobuf_message_test_messages.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
D chrome/common/safe_browsing/protobuf_message_param_traits.h View 1 chunk +0 lines, -66 lines 0 comments Download
M chrome/common/safe_browsing/safe_archive_analyzer_param_traits.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ipc/BUILD.gn View 1 2 3 4 5 6 5 chunks +25 lines, -0 lines 0 comments Download
M ipc/DEPS View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
M ipc/ipc_fuzzing_tests.cc View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A ipc/ipc_message_protobuf_utils.h View 1 2 3 4 5 6 1 chunk +72 lines, -0 lines 2 comments Download
A ipc/ipc_message_protobuf_utils_unittest.cc View 1 2 3 4 5 6 1 chunk +193 lines, -0 lines 0 comments Download
A ipc/test_proto.proto View 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 99 (70 generated)
Hzj_jie
3 years, 5 months ago (2017-07-07 23:56:14 UTC) #32
dcheng
https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h File ipc/ipc_message_repeated_field_utils.h (right): https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h#newcode23 ipc/ipc_message_repeated_field_utils.h:23: template <template<class> class RepeatedFieldLike, class P> Is it important ...
3 years, 5 months ago (2017-07-10 18:38:10 UTC) #35
Hzj_jie
https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h File ipc/ipc_message_repeated_field_utils.h (right): https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h#newcode23 ipc/ipc_message_repeated_field_utils.h:23: template <template<class> class RepeatedFieldLike, class P> On 2017/07/10 18:38:10, ...
3 years, 5 months ago (2017-07-10 23:53:37 UTC) #40
dcheng
https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h File ipc/ipc_message_repeated_field_utils.h (right): https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h#newcode23 ipc/ipc_message_repeated_field_utils.h:23: template <template<class> class RepeatedFieldLike, class P> On 2017/07/10 23:53:37, ...
3 years, 5 months ago (2017-07-11 05:38:59 UTC) #41
Hzj_jie
https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h File ipc/ipc_message_repeated_field_utils.h (right): https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h#newcode23 ipc/ipc_message_repeated_field_utils.h:23: template <template<class> class RepeatedFieldLike, class P> On 2017/07/11 05:38:59, ...
3 years, 5 months ago (2017-07-11 05:59:02 UTC) #42
dcheng
On 2017/07/11 05:59:02, Hzj_jie wrote: > https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h > File ipc/ipc_message_repeated_field_utils.h (right): > > https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h#newcode23 > ...
3 years, 5 months ago (2017-07-11 18:14:24 UTC) #43
Hzj_jie
On 2017/07/11 18:14:24, dcheng wrote: > On 2017/07/11 05:59:02, Hzj_jie wrote: > > > https://codereview.chromium.org/2968003005/diff/100001/ipc/ipc_message_repeated_field_utils.h ...
3 years, 5 months ago (2017-07-11 18:25:09 UTC) #44
Hzj_jie
Code has been updated.
3 years, 5 months ago (2017-07-11 23:48:22 UTC) #53
dcheng
https://codereview.chromium.org/2968003005/diff/160001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2968003005/diff/160001/ipc/ipc_message_utils.h#newcode126 ipc/ipc_message_utils.h:126: static inline bool IsPickleSizeSufficient(const base::Pickle* m, OK, sorry. I ...
3 years, 5 months ago (2017-07-12 08:52:15 UTC) #54
Hzj_jie
https://codereview.chromium.org/2968003005/diff/160001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2968003005/diff/160001/ipc/ipc_message_utils.h#newcode126 ipc/ipc_message_utils.h:126: static inline bool IsPickleSizeSufficient(const base::Pickle* m, On 2017/07/12 08:52:14, ...
3 years, 5 months ago (2017-07-13 00:01:03 UTC) #57
Hzj_jie
Any comments?
3 years, 5 months ago (2017-07-13 21:22:37 UTC) #60
dcheng
https://codereview.chromium.org/2968003005/diff/180001/ipc/ipc_fuzzing_tests.cc File ipc/ipc_fuzzing_tests.cc (left): https://codereview.chromium.org/2968003005/diff/180001/ipc/ipc_fuzzing_tests.cc#oldcode101 ipc/ipc_fuzzing_tests.cc:101: #endif Is it confirmed that this isn't a problem ...
3 years, 5 months ago (2017-07-13 22:25:07 UTC) #61
Hzj_jie
https://codereview.chromium.org/2968003005/diff/180001/ipc/ipc_fuzzing_tests.cc File ipc/ipc_fuzzing_tests.cc (left): https://codereview.chromium.org/2968003005/diff/180001/ipc/ipc_fuzzing_tests.cc#oldcode101 ipc/ipc_fuzzing_tests.cc:101: #endif On 2017/07/13 22:25:07, dcheng wrote: > Is it ...
3 years, 5 months ago (2017-07-14 00:25:10 UTC) #64
dcheng
LGTM https://codereview.chromium.org/2968003005/diff/200001/ipc/ipc_message_repeated_field_utils.h File ipc/ipc_message_repeated_field_utils.h (right): https://codereview.chromium.org/2968003005/diff/200001/ipc/ipc_message_repeated_field_utils.h#newcode5 ipc/ipc_message_repeated_field_utils.h:5: #ifndef IPC_IPC_MESSAGE_REPEATED_FIELD_UTILS_H_ Nit: I would personally call this ...
3 years, 5 months ago (2017-07-14 18:07:41 UTC) #67
Hzj_jie
https://codereview.chromium.org/2968003005/diff/200001/ipc/ipc_message_repeated_field_utils.h File ipc/ipc_message_repeated_field_utils.h (right): https://codereview.chromium.org/2968003005/diff/200001/ipc/ipc_message_repeated_field_utils.h#newcode5 ipc/ipc_message_repeated_field_utils.h:5: #ifndef IPC_IPC_MESSAGE_REPEATED_FIELD_UTILS_H_ On 2017/07/14 18:07:40, dcheng wrote: > Nit: ...
3 years, 5 months ago (2017-07-14 23:05:58 UTC) #74
Hzj_jie
Hi, Carlos and Jialiu, would you please have a look at this change? Carlos: //ipc/ ...
3 years, 5 months ago (2017-07-14 23:50:30 UTC) #76
Jialiu Lin
LGTM
3 years, 5 months ago (2017-07-15 00:13:13 UTC) #77
Hzj_jie
It looks like Carlos is busy. Ken, would you mind to have a look at ...
3 years, 5 months ago (2017-07-17 18:42:12 UTC) #79
Ken Rockot(use gerrit already)
lgtm
3 years, 5 months ago (2017-07-17 19:13:29 UTC) #80
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/2968003005/220001
3 years, 5 months ago (2017-07-18 00:04:04 UTC) #83
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/491934)
3 years, 5 months ago (2017-07-18 00:15:04 UTC) #85
Hzj_jie
Adam, would you mind to have a look at this change? I need your sign-off ...
3 years, 5 months ago (2017-07-18 01:03:27 UTC) #87
Hzj_jie
I cannot reach Adam today. Peter, would you mind to sign-off this change to let ...
3 years, 5 months ago (2017-07-18 18:31:35 UTC) #89
Peter Kasting
DEPS change LGTM
3 years, 5 months ago (2017-07-18 18:53:57 UTC) #90
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/2968003005/220001
3 years, 5 months ago (2017-07-18 19:05:07 UTC) #92
xyzzyz
LGTM https://codereview.chromium.org/2968003005/diff/220001/ipc/ipc_message_protobuf_utils.h File ipc/ipc_message_protobuf_utils.h (right): https://codereview.chromium.org/2968003005/diff/220001/ipc/ipc_message_protobuf_utils.h#newcode25 ipc/ipc_message_protobuf_utils.h:25: typedef RepeatedFieldLike param_type; Type names start with a ...
3 years, 5 months ago (2017-07-18 20:34:55 UTC) #94
commit-bot: I haz the power
Committed patchset #7 (id:220001) as https://chromium.googlesource.com/chromium/src/+/84eef4fac4a6d97ac9dd0f05a8853f54116654ce
3 years, 5 months ago (2017-07-18 20:40:23 UTC) #97
Hzj_jie
https://codereview.chromium.org/2968003005/diff/220001/ipc/ipc_message_protobuf_utils.h File ipc/ipc_message_protobuf_utils.h (right): https://codereview.chromium.org/2968003005/diff/220001/ipc/ipc_message_protobuf_utils.h#newcode25 ipc/ipc_message_protobuf_utils.h:25: typedef RepeatedFieldLike param_type; On 2017/07/18 20:34:55, xyzzyz wrote: > ...
3 years, 5 months ago (2017-07-18 20:46:11 UTC) #98
Ken Rockot(use gerrit already)
3 years, 5 months ago (2017-07-18 20:50:07 UTC) #99
Message was sent while issue was closed.
On Tue, Jul 18, 2017 at 1:46 PM, <zijiehe@chromium.org> wrote:

>
> https://codereview.chromium.org/2968003005/diff/220001/
> ipc/ipc_message_protobuf_utils.h
> File ipc/ipc_message_protobuf_utils.h (right):
>
> https://codereview.chromium.org/2968003005/diff/220001/
> ipc/ipc_message_protobuf_utils.h#newcode25
> ipc/ipc_message_protobuf_utils.h:25: typedef RepeatedFieldLike
> param_type;
> On 2017/07/18 20:34:55, xyzzyz wrote:
> > Type names start with a capital letter and have a capital letter for
> each new
> > word, with no underscores: MyExcitingClass, MyExcitingEnum.
> > The names of all types — classes, structs, type aliases, enums, and
> type
> > template parameters — have the same naming convention.
> >
> > https://google.github.io/styleguide/cppguide.html#Type_Names
> >
>
> This is a requirement in IPC AFAICT.
>

It's not a requirement, but it is a convention. Definitely an unfortunate
convention, but an established one all the same.


>
> https://codereview.chromium.org/2968003005/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698