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

Issue 509133002: Raw SocketDescriptor variant of UnixDomainServerSocket::Accept (Closed)

Created:
6 years, 3 months ago by Chris Masone
Modified:
6 years, 3 months ago
Reviewers:
byungchul, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Raw SocketDescriptor variant of UnixDomainServerSocket::Accept The Mojo code on CrOS needs to accept inbound connections on a unix domain socket, and then 'promote' the resulting sockets to Mojo MessagePipes. This really requires access to the underying file descriptor, so provide a mechanism to accept a connection and get back a SocketDescriptor. BUG=407782 TEST=UnixDomain*SocketTest R=mmenke@chromium.org Committed: https://crrev.com/ca100d5970b0d0b9a3af96d180f5ea2862227a48 Cr-Commit-Position: refs/heads/master@{#293172}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address byungchul's comments #

Patch Set 3 : Add ReleaseSocketDescriptor to UnixDomainClientSocket class #

Total comments: 5

Patch Set 4 : Address nits; waiting on mmenke for broader comments. #

Total comments: 13

Patch Set 5 : Fix usage of Close(), add a read() to unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -38 lines) Patch
M net/socket/socket_libevent.h View 1 2 3 4 3 chunks +6 lines, -1 line 0 comments Download
M net/socket/socket_libevent.cc View 1 2 3 4 3 chunks +37 lines, -26 lines 0 comments Download
M net/socket/unix_domain_client_socket_posix.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M net/socket/unix_domain_client_socket_posix.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M net/socket/unix_domain_client_socket_posix_unittest.cc View 1 2 3 4 2 chunks +50 lines, -0 lines 0 comments Download
M net/socket/unix_domain_server_socket_posix.h View 1 1 chunk +14 lines, -2 lines 0 comments Download
M net/socket/unix_domain_server_socket_posix.cc View 1 2 3 4 4 chunks +44 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (1 generated)
Chris Masone
cmasone@chromium.org changed reviewers: + byungchul@chromium.org
6 years, 3 months ago (2014-08-27 19:27:08 UTC) #1
Chris Masone
The unittests for this work locally, and I'm running trybots now. Suggestions for other tests ...
6 years, 3 months ago (2014-08-27 19:27:08 UTC) #2
byungchul
Though I am fine with this approach, what about introducing "SocketLibevent* socket()", or "SocketDescriptor ReleaseSocketDescriptor()" ...
6 years, 3 months ago (2014-08-27 23:35:51 UTC) #3
mmenke
On 2014/08/27 23:35:51, byungchul wrote: > Though I am fine with this approach, what about ...
6 years, 3 months ago (2014-08-28 00:15:01 UTC) #4
Chris Masone
On 2014/08/28 00:15:01, mmenke wrote: > On 2014/08/27 23:35:51, byungchul wrote: > > Though I ...
6 years, 3 months ago (2014-08-28 00:30:45 UTC) #5
Chris Masone
Anyone have an idea about how to address the issue I mentioned in my previous ...
6 years, 3 months ago (2014-08-28 17:53:16 UTC) #6
mmenke
On 2014/08/28 00:30:45, Chris Masone wrote: > On 2014/08/28 00:15:01, mmenke wrote: > > On ...
6 years, 3 months ago (2014-08-28 19:33:03 UTC) #7
Chris Masone
On 2014/08/28 19:33:03, mmenke wrote: > On 2014/08/28 00:30:45, Chris Masone wrote: > > On ...
6 years, 3 months ago (2014-08-28 20:10:01 UTC) #8
mmenke
On 2014/08/28 20:10:01, Chris Masone wrote: > On 2014/08/28 19:33:03, mmenke wrote: > > On ...
6 years, 3 months ago (2014-08-28 20:21:24 UTC) #9
Chris Masone
On 2014/08/28 20:21:24, mmenke wrote: > On 2014/08/28 20:10:01, Chris Masone wrote: > > On ...
6 years, 3 months ago (2014-08-28 20:35:25 UTC) #10
Chris Masone
On 2014/08/28 20:35:25, Chris Masone wrote: > On 2014/08/28 20:21:24, mmenke wrote: > > On ...
6 years, 3 months ago (2014-08-29 20:42:32 UTC) #11
byungchul
On 2014/08/29 20:42:32, Chris Masone wrote: > On 2014/08/28 20:35:25, Chris Masone wrote: > > ...
6 years, 3 months ago (2014-08-29 20:48:36 UTC) #12
Chris Masone
On 2014/08/29 20:48:36, byungchul wrote: > On 2014/08/29 20:42:32, Chris Masone wrote: > > On ...
6 years, 3 months ago (2014-09-02 16:52:38 UTC) #13
mmenke
On 2014/09/02 16:52:38, Chris Masone wrote: > On 2014/08/29 20:48:36, byungchul wrote: > > On ...
6 years, 3 months ago (2014-09-02 18:52:09 UTC) #14
Chris Masone
> > Sorry, took Friday off, and accumulated 10+ reviews over the last 4 days...Fun! ...
6 years, 3 months ago (2014-09-02 23:27:57 UTC) #15
byungchul
https://codereview.chromium.org/509133002/diff/40001/net/socket/unix_domain_client_socket_posix.cc File net/socket/unix_domain_client_socket_posix.cc (right): https://codereview.chromium.org/509133002/diff/40001/net/socket/unix_domain_client_socket_posix.cc#newcode163 net/socket/unix_domain_client_socket_posix.cc:163: if (socket_) { Fast return if !socket_ https://codereview.chromium.org/509133002/diff/40001/net/socket/unix_domain_client_socket_posix.h File ...
6 years, 3 months ago (2014-09-03 00:13:55 UTC) #16
Chris Masone
Addressed nits; I'll let mmenke speak to the down-cast issue. https://codereview.chromium.org/509133002/diff/40001/net/socket/unix_domain_client_socket_posix.cc File net/socket/unix_domain_client_socket_posix.cc (right): https://codereview.chromium.org/509133002/diff/40001/net/socket/unix_domain_client_socket_posix.cc#newcode163 ...
6 years, 3 months ago (2014-09-03 02:38:39 UTC) #17
mmenke
I'm generally very strongly against casting, perhaps irrationally so, unless it's really needed, and in ...
6 years, 3 months ago (2014-09-03 14:56:46 UTC) #18
Chris Masone
https://codereview.chromium.org/509133002/diff/60001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/509133002/diff/60001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode177 net/socket/unix_domain_client_socket_posix_unittest.cc:177: SocketDescriptor client_socket_fd = client_socket.ReleaseSocketDescriptor(); On 2014/09/03 14:56:46, mmenke wrote: ...
6 years, 3 months ago (2014-09-03 15:03:41 UTC) #19
mmenke
On 2014/09/03 15:03:41, Chris Masone wrote: > https://codereview.chromium.org/509133002/diff/60001/net/socket/unix_domain_client_socket_posix_unittest.cc > File net/socket/unix_domain_client_socket_posix_unittest.cc (right): > > https://codereview.chromium.org/509133002/diff/60001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode177 ...
6 years, 3 months ago (2014-09-03 15:14:20 UTC) #20
Chris Masone
https://codereview.chromium.org/509133002/diff/60001/net/socket/socket_libevent.cc File net/socket/socket_libevent.cc (right): https://codereview.chromium.org/509133002/diff/60001/net/socket/socket_libevent.cc#newcode112 net/socket/socket_libevent.cc:112: Close(); On 2014/09/03 14:56:46, mmenke wrote: > This seems ...
6 years, 3 months ago (2014-09-03 15:57:12 UTC) #21
mmenke
LGTM
6 years, 3 months ago (2014-09-03 17:11:05 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmasone@chromium.org/509133002/80001
6 years, 3 months ago (2014-09-03 17:12:07 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:80001) as b5a2ab003bd62b4c48206ecfef05694984747320
6 years, 3 months ago (2014-09-03 18:12:39 UTC) #25
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:26:55 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ca100d5970b0d0b9a3af96d180f5ea2862227a48
Cr-Commit-Position: refs/heads/master@{#293172}

Powered by Google App Engine
This is Rietveld 408576698