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

Issue 1659003003: IPC::Message -> base::Pickle (Closed)

Created:
4 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 10 months ago
Reviewers:
Tom Sepez, jam
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, cc-bugs_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, chromoting-reviews_chromium.org, cmumford, darin (slow to review), darin-cc_chromium.org, extensions-reviews_chromium.org, feature-media-reviews_chromium.org, grt+watch_chromium.org, jsbell+idb_chromium.org, markusheintz_, msramek+watch_chromium.org, ortuno+watch_chromium.org, piman+watch_chromium.org, qsr+mojo_chromium.org, raymes+watch_chromium.org, scheib+watch_chromium.org, tdresser+watch_chromium.org, viettrungluu+watch_chromium.org, vmpstr+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IPC::Message -> base::Pickle This changes consumers of IPC::Message to generally refer refer to base::Pickle instead when performing serialization and deserialization operations. The few specific instances where the IPC::Message interface (Read/WriteAttachent) is needed can safely be static_cast'd, as IPC::Message is the only public subclass of base::Pickle. The purpose of this change is to facilitate the transition to Mojo IPC, as we've trained the Mojo bindings layer to use existing ParamTraits<T> parameterized over base::Pickle. To support this base::Pickle has had some stub interfaces added for WriteAttachment and ReadAttachment, along with a Pickle::Attachment. A follow-up patch will add sizing traits to the standard IPC_STRUCT macros, enabling the majority of Chrome IPC structs to be carried over Mojo message pipes as-is. BUG=577685 R=jam@chromium.org Committed: https://crrev.com/502c94ff1a9f99b5c4ecfe700415cc4ed14228dd Cr-Commit-Position: refs/heads/master@{#373323}

Patch Set 1 #

Patch Set 2 : export base::Pickle::Attachment #

Total comments: 1

Patch Set 3 : update win and mac handles #

Patch Set 4 : fix missing comment #

Total comments: 1

Patch Set 5 : just alias IPC::MessageAttachment -> base::Pickle::Attachment. tada #

Patch Set 6 : move stuff back to IPC::MessageAttachment #

Patch Set 7 : fix mac, win, cast #

Patch Set 8 : one more mac fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1067 lines, -808 lines) Patch
M base/pickle.h View 1 2 3 4 5 3 chunks +33 lines, -0 lines 0 comments Download
M base/pickle.cc View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/common/cast_messages.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/cast_messages.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/common/content_settings_pattern_serializer.h View 1 chunk +3 lines, -6 lines 0 comments Download
M chrome/common/content_settings_pattern_serializer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/render_messages.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/render_messages.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/common/safe_browsing/ipc_protobuf_message_macros.h View 1 chunk +18 lines, -17 lines 0 comments Download
M chrome/common/safe_browsing/protobuf_message_param_traits.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/safe_browsing/protobuf_message_read_macros.h View 1 chunk +13 lines, -15 lines 0 comments Download
M chrome/common/safe_browsing/protobuf_message_write_macros.h View 1 chunk +1 line, -1 line 0 comments Download
M chromecast/common/media/cma_param_traits.h View 1 2 3 4 5 6 1 chunk +8 lines, -4 lines 0 comments Download
M chromecast/common/media/cma_param_traits.cc View 1 2 3 4 5 6 4 chunks +6 lines, -4 lines 0 comments Download
M components/network_hints/common/network_hints_messages.h View 1 chunk +4 lines, -2 lines 0 comments Download
M components/network_hints/common/network_hints_messages.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/child/plugin_param_traits.h View 1 chunk +8 lines, -4 lines 0 comments Download
M content/child/plugin_param_traits.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M content/common/cc_messages.h View 1 chunk +44 lines, -22 lines 0 comments Download
M content/common/cc_messages.cc View 22 chunks +26 lines, -28 lines 0 comments Download
M content/common/content_param_traits.h View 2 chunks +7 lines, -7 lines 0 comments Download
M content/common/content_param_traits.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/common/gamepad_param_traits.h View 2 chunks +3 lines, -2 lines 0 comments Download
M content/common/gamepad_param_traits.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M content/common/indexed_db/indexed_db_param_traits.h View 1 chunk +12 lines, -6 lines 0 comments Download
M content/common/indexed_db/indexed_db_param_traits.cc View 5 chunks +8 lines, -6 lines 0 comments Download
M content/common/input/input_param_traits.h View 1 chunk +8 lines, -4 lines 0 comments Download
M content/common/input/input_param_traits.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M content/common/mac/attributed_string_coder.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -4 lines 0 comments Download
M content/common/mac/attributed_string_coder.mm View 1 2 3 4 5 6 7 2 chunks +6 lines, -4 lines 0 comments Download
M content/common/media/media_param_traits.h View 1 chunk +8 lines, -4 lines 0 comments Download
M content/common/media/media_param_traits.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/common/resource_messages.h View 1 2 3 4 5 6 7 1 chunk +20 lines, -10 lines 0 comments Download
M content/common/resource_messages.cc View 10 chunks +17 lines, -14 lines 0 comments Download
M content/public/common/common_param_traits.h View 1 chunk +27 lines, -14 lines 0 comments Download
M content/public/common/common_param_traits.cc View 7 chunks +14 lines, -13 lines 0 comments Download
M device/bluetooth/bluetooth_uuid.h View 2 chunks +5 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_uuid.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/extension_messages.h View 1 chunk +32 lines, -16 lines 0 comments Download
M extensions/common/extension_messages.cc View 13 chunks +21 lines, -22 lines 0 comments Download
M extensions/common/permissions/api_permission.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/permissions/api_permission.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/permissions/manifest_permission.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/permissions/manifest_permission.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/permissions/set_disjunction_permission.h View 1 chunk +2 lines, -4 lines 0 comments Download
M extensions/common/permissions/settings_override_permission.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/permissions/settings_override_permission.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.h View 1 chunk +20 lines, -10 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.cc View 6 chunks +20 lines, -19 lines 0 comments Download
M ipc/handle_win.h View 1 2 3 4 5 6 2 chunks +5 lines, -2 lines 0 comments Download
M ipc/handle_win.cc View 1 2 3 4 5 6 2 chunks +7 lines, -5 lines 0 comments Download
M ipc/ipc_channel_proxy_unittest_messages.h View 1 chunk +4 lines, -2 lines 0 comments Download
M ipc/ipc_message.h View 1 2 3 4 5 1 chunk +6 lines, -4 lines 0 comments Download
M ipc/ipc_message.cc View 5 2 chunks +6 lines, -4 lines 0 comments Download
M ipc/ipc_message_attachment.h View 5 3 chunks +3 lines, -3 lines 0 comments Download
M ipc/ipc_message_utils.h View 49 chunks +108 lines, -112 lines 0 comments Download
M ipc/ipc_message_utils.cc View 1 2 3 4 5 6 7 40 chunks +66 lines, -60 lines 0 comments Download
M ipc/mach_port_mac.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M ipc/mach_port_mac.cc View 1 2 3 4 5 6 2 chunks +7 lines, -5 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo_unittest.cc View 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M ipc/mojo/ipc_mojo_message_helper.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ipc/mojo/ipc_mojo_message_helper.cc View 5 2 chunks +7 lines, -5 lines 0 comments Download
M ipc/param_traits_macros.h View 2 chunks +21 lines, -19 lines 0 comments Download
M ipc/param_traits_read_macros.h View 1 chunk +14 lines, -14 lines 0 comments Download
M ipc/param_traits_write_macros.h View 1 chunk +5 lines, -4 lines 0 comments Download
M ppapi/proxy/nacl_message_scanner.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppapi_param_traits.h View 7 chunks +72 lines, -36 lines 0 comments Download
M ppapi/proxy/ppapi_param_traits.cc View 29 chunks +41 lines, -40 lines 0 comments Download
M ppapi/proxy/raw_var_data.h View 1 2 3 4 5 6 7 9 chunks +17 lines, -18 lines 0 comments Download
M ppapi/proxy/raw_var_data.cc View 1 2 3 4 5 6 7 13 chunks +17 lines, -20 lines 0 comments Download
M ppapi/proxy/raw_var_data_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/resource_message_params.h View 1 2 3 4 5 6 5 chunks +17 lines, -19 lines 0 comments Download
M ppapi/proxy/resource_message_params.cc View 1 2 3 4 5 chunks +11 lines, -11 lines 0 comments Download
M ppapi/proxy/serialized_flash_menu.h View 2 chunks +3 lines, -2 lines 0 comments Download
M ppapi/proxy/serialized_flash_menu.cc View 6 chunks +8 lines, -9 lines 0 comments Download
M ppapi/proxy/serialized_var.h View 2 chunks +6 lines, -8 lines 0 comments Download
M ppapi/proxy/serialized_var.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M printing/pdf_render_settings.h View 1 chunk +3 lines, -2 lines 0 comments Download
M remoting/host/chromoting_param_traits.h View 1 chunk +20 lines, -10 lines 0 comments Download
M remoting/host/chromoting_param_traits.cc View 8 chunks +11 lines, -12 lines 0 comments Download
M ui/events/ipc/latency_info_param_traits.h View 1 chunk +4 lines, -2 lines 0 comments Download
M ui/events/ipc/latency_info_param_traits.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ui/gfx/ipc/gfx_param_traits.h View 3 chunks +52 lines, -26 lines 0 comments Download
M ui/gfx/ipc/gfx_param_traits.cc View 14 chunks +29 lines, -26 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 25 (7 generated)
Ken Rockot(use gerrit already)
4 years, 10 months ago (2016-02-02 16:41:53 UTC) #2
jam
lgtm https://codereview.chromium.org/1659003003/diff/20001/base/pickle.h File base/pickle.h (right): https://codereview.chromium.org/1659003003/diff/20001/base/pickle.h#newcode127 base/pickle.h:127: // nit: add comment
4 years, 10 months ago (2016-02-02 18:00:46 UTC) #5
jam
(i'm not enough of a review for all these files, you'll want a security person ...
4 years, 10 months ago (2016-02-02 18:01:12 UTC) #6
Ken Rockot(use gerrit already)
tsepez@, please take a look. This is a pretty rote conversion, but there are a ...
4 years, 10 months ago (2016-02-02 18:02:15 UTC) #8
Tom Sepez
It seems like there must be a cleaner way of doing this. Maybe there's some ...
4 years, 10 months ago (2016-02-02 19:25:55 UTC) #9
Ken Rockot(use gerrit already)
On Tue, Feb 2, 2016 at 11:25 AM, <tsepez@chromium.org> wrote: > It seems like there ...
4 years, 10 months ago (2016-02-02 19:50:43 UTC) #10
jam
quick note: this change to Pickle is only temporary. once all the IPCs that use ...
4 years, 10 months ago (2016-02-02 20:38:35 UTC) #11
Ken Rockot(use gerrit already)
No more downcasts! I fully moved the attachment concept into base::Pickle::Attachment; IPC::MessageAttachment is now just ...
4 years, 10 months ago (2016-02-02 21:37:01 UTC) #12
jam
On 2016/02/02 21:37:01, Ken Rockot wrote: > No more downcasts! I fully moved the attachment ...
4 years, 10 months ago (2016-02-02 21:45:14 UTC) #13
Ken Rockot(use gerrit already)
Hmm. Not sure what's really worse - nominal awareness of attachment types or potentially unsafe ...
4 years, 10 months ago (2016-02-02 21:55:22 UTC) #14
jam
On 2016/02/02 21:55:22, Ken Rockot wrote: > Hmm. Not sure what's really worse - nominal ...
4 years, 10 months ago (2016-02-02 23:54:09 UTC) #15
Tom Sepez
On 2016/02/02 23:54:09, jam wrote: > On 2016/02/02 21:55:22, Ken Rockot wrote: > > Hmm. ...
4 years, 10 months ago (2016-02-03 00:00:53 UTC) #16
Ken Rockot(use gerrit already)
OK - thank you both for enduring multiple iterations of this patch :) I've moved ...
4 years, 10 months ago (2016-02-03 15:47:13 UTC) #18
jam
On 2016/02/03 15:47:13, Ken Rockot wrote: > OK - thank you both for enduring multiple ...
4 years, 10 months ago (2016-02-03 16:36:17 UTC) #19
Tom Sepez
lgtm
4 years, 10 months ago (2016-02-03 17:44:05 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1659003003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1659003003/140001
4 years, 10 months ago (2016-02-03 18:47:42 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 10 months ago (2016-02-03 20:20:27 UTC) #23
commit-bot: I haz the power
4 years, 10 months ago (2016-02-03 20:21:58 UTC) #25
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/502c94ff1a9f99b5c4ecfe700415cc4ed14228dd
Cr-Commit-Position: refs/heads/master@{#373323}

Powered by Google App Engine
This is Rietveld 408576698