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

Issue 2649573004: Mojo bindings: merge the control messages of sending disconnect reason and notifying endpoint close… (Closed)

Created:
3 years, 11 months ago by yzshen1
Modified:
3 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo bindings: merge the control messages of sending disconnect reason and notifying endpoint closed. This is part of the work to remove AssociatedGroup and simplify the associated interface API. BUG=682334 Review-Url: https://codereview.chromium.org/2649573004 Cr-Commit-Position: refs/heads/master@{#445473} Committed: https://chromium.googlesource.com/chromium/src/+/8be41d3abfb2a8f5d7b58b3e70ebbc86fc7aa5d6

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -169 lines) Patch
M ipc/ipc_mojo_bootstrap.cc View 7 chunks +26 lines, -8 lines 0 comments Download
M mojo/public/cpp/bindings/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/cpp/bindings/associated_binding.h View 1 chunk +2 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/associated_group_controller.h View 2 chunks +6 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/associated_interface_ptr.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/bindings/associated_interface_request.h View 1 chunk +1 line, -19 lines 0 comments Download
A mojo/public/cpp/bindings/disconnect_reason.h View 1 chunk +25 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/interface_endpoint_client.h View 3 chunks +5 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/interface_ptr.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/bindings/interface_request.h View 2 chunks +8 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h View 1 chunk +2 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/lib/binding_state.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/control_message_handler.h View 3 chunks +0 lines, -13 lines 0 comments Download
M mojo/public/cpp/bindings/lib/control_message_handler.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M mojo/public/cpp/bindings/lib/control_message_proxy.h View 2 chunks +2 lines, -10 lines 0 comments Download
M mojo/public/cpp/bindings/lib/control_message_proxy.cc View 3 chunks +1 line, -20 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_endpoint_client.cc View 4 chunks +17 lines, -8 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_ptr_state.h View 1 chunk +2 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.h View 2 chunks +7 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.cc View 9 chunks +30 lines, -9 lines 0 comments Download
M mojo/public/cpp/bindings/lib/pipe_control_message_handler.cc View 1 chunk +9 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc View 2 chunks +38 lines, -30 lines 0 comments Download
M mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc View 2 chunks +20 lines, -7 lines 3 comments Download
M mojo/public/cpp/bindings/pipe_control_message_handler.h View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/pipe_control_message_handler_delegate.h View 2 chunks +5 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/pipe_control_message_proxy.h View 2 chunks +9 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h View 3 chunks +8 lines, -0 lines 0 comments Download
M mojo/public/interfaces/bindings/interface_control_messages.mojom View 2 chunks +0 lines, -9 lines 0 comments Download
M mojo/public/interfaces/bindings/pipe_control_messages.mojom View 1 chunk +9 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 15 (8 generated)
yzshen1
Hi, Ken and Daniel. Would you please take a look? Thanks! Ken: everything. Daniel: the ...
3 years, 11 months ago (2017-01-21 02:04:09 UTC) #4
Ken Rockot(use gerrit already)
lgtm
3 years, 11 months ago (2017-01-23 18:58:03 UTC) #7
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/2649573004/1
3 years, 11 months ago (2017-01-23 18:59:32 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/8be41d3abfb2a8f5d7b58b3e70ebbc86fc7aa5d6
3 years, 11 months ago (2017-01-23 20:41:19 UTC) #12
dcheng
LGTM However, I'm wondering how the OWNERS check passed, since I think the mojom files ...
3 years, 11 months ago (2017-01-23 23:20:22 UTC) #13
yzshen1
Sorry Daniel. I did add you as security OWNER but somehow forgot to wait for ...
3 years, 11 months ago (2017-01-23 23:30:09 UTC) #14
dcheng
3 years, 11 months ago (2017-01-24 03:39:21 UTC) #15
Message was sent while issue was closed.
On 2017/01/23 23:30:09, yzshen1 wrote:
> Sorry Daniel. I did add you as security OWNER but somehow forgot to wait for
> your review before I checked the CQ.
> 
> And I am also surprised that our PRESUMIT check didn't catch 
> that.
> 

No problem, it's the tool's job to enforce it, not the developer's anyway. I'll
figure out what's changed.

https://codereview.chromium.org/2649573004/diff/1/mojo/public/cpp/bindings/li...
File mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc (right):

https://codereview.chromium.org/2649573004/diff/1/mojo/public/cpp/bindings/li...
mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc:43:
ResetInternal(reason);
On 2017/01/23 23:30:09, yzshen1 wrote:
> On 2017/01/23 23:20:22, dcheng wrote:
> > FWIW, here and a couple other places
> > 
> > ResetInternal(DisconnectReason(custom_reason, description))
> > 
> > would also work and should save a copy.
> 
> I think the original code doesn't copy either. Have I missed anything?
> 
> But the change you proposed is more concise. I could make such a change in my
> next CL.

Ah, you're right: my comment is only true if |reason| is passed by value instead
of const ref. Sorry!

Powered by Google App Engine
This is Rietveld 408576698