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

Issue 376323002: Refactor unix domain socket. (Closed)

Created:
6 years, 5 months ago by byungchul
Modified:
6 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, vsevik, chromoting-reviews_chromium.org, jam, yurys, paulirish+reviews_chromium.org, darin-cc_chromium.org, pfeldman, devtools-reviews_chromium.org, aandrey+blink_chromium.org, android-webview-reviews_chromium.org, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactor unix domain socket. This is a pre-requisite for http server refactoring, https://codereview.chromium.org/296053012/. 1) Define UnixDomainClientSocket and UnixDomainServerSocket utilizing SocketLibevent. 2) Rename UnixDomainSocket to UnixDomainListenSocket to reduce confusion. 3) unittests BUG=371906 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285148

Patch Set 1 #

Total comments: 42

Patch Set 2 : Rebased and applied comments. #

Patch Set 3 : Revert filename of unix domain listen socket temporarily for review convenience #

Total comments: 42

Patch Set 4 : Rebased #

Patch Set 5 : Addressed comments. #

Patch Set 6 : Make sure read/write synchronous in unittests. #

Patch Set 7 : Checked uid and gid in unittests. #

Total comments: 21

Patch Set 8 : Test read error on connection closed event. #

Patch Set 9 : Make all connect in unittests synchronous. #

Total comments: 10

Patch Set 10 : Addressed comments and debugging connect() failure in mac_chromium_rel unittests. #

Patch Set 11 : Rebased and renamed files for UnixDomainListenSocket #

Patch Set 12 : Revert ScopedTempDir in UnixDomainListenSocket unittests because of failure in mac_chromium_rel. #

Patch Set 13 : Fix unittests because of incomplete reversion #

Total comments: 22

Patch Set 14 : Applied comments, and shortened socket path for unittests not to overflow sockaddr in mac. #

Total comments: 2

Patch Set 15 : Moved UnixDomainListenSocket to net::deprecated namespace. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1347 lines, -732 lines) Patch
M android_webview/native/aw_dev_tools_server.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/android/dev_tools_server.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +9 lines, -8 lines 0 comments Download
M content/shell/browser/shell_devtools_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -3 lines 0 comments Download
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -3 lines 0 comments Download
A net/socket/unix_domain_client_socket_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +79 lines, -0 lines 0 comments Download
A net/socket/unix_domain_client_socket_posix.cc View 1 1 chunk +162 lines, -0 lines 0 comments Download
A net/socket/unix_domain_client_socket_posix_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +397 lines, -0 lines 0 comments Download
A net/socket/unix_domain_listen_socket_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +122 lines, -0 lines 0 comments Download
A net/socket/unix_domain_listen_socket_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +169 lines, -0 lines 0 comments Download
A + net/socket/unix_domain_listen_socket_posix_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +57 lines, -52 lines 0 comments Download
A net/socket/unix_domain_server_socket_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +69 lines, -0 lines 0 comments Download
A net/socket/unix_domain_server_socket_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +145 lines, -0 lines 0 comments Download
A net/socket/unix_domain_server_socket_posix_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +115 lines, -0 lines 0 comments Download
D net/socket/unix_domain_socket_posix.h View 3 4 5 6 7 8 9 10 1 chunk +0 lines, -126 lines 0 comments Download
D net/socket/unix_domain_socket_posix.cc View 3 4 5 6 7 8 9 10 1 chunk +0 lines, -196 lines 0 comments Download
D net/socket/unix_domain_socket_posix_unittest.cc View 3 4 5 6 7 8 9 10 1 chunk +0 lines, -338 lines 0 comments Download
M remoting/host/gnubby_auth_handler_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
byungchul
Please review unix domain sockets based on socket libevent.
6 years, 5 months ago (2014-07-09 22:46:00 UTC) #1
mmenke
Not quite a full review - still need to look at the unit tests, and ...
6 years, 5 months ago (2014-07-10 19:07:29 UTC) #2
byungchul
Tried to reduce renameLimit, but it's only for diff and merge. Actually, git detects correctly ...
6 years, 5 months ago (2014-07-11 02:56:33 UTC) #3
byungchul
PTAL, For review convenience, reverted filename of unix domain listen socket temporarily. Will re-change it ...
6 years, 5 months ago (2014-07-11 16:19:19 UTC) #4
mmenke
https://codereview.chromium.org/376323002/diff/40001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/40001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode43 net/socket/unix_domain_client_socket_posix_unittest.cc:43: virtual void SetUp() OVERRIDE { Can just do this ...
6 years, 5 months ago (2014-07-11 20:44:05 UTC) #5
byungchul
https://codereview.chromium.org/376323002/diff/40001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/40001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode43 net/socket/unix_domain_client_socket_posix_unittest.cc:43: virtual void SetUp() OVERRIDE { On 2014/07/11 20:44:03, mmenke ...
6 years, 5 months ago (2014-07-14 17:49:23 UTC) #6
mmenke
So one issue remains - expecting reads/writes to be synchronous makes me extremely nervous. Could ...
6 years, 5 months ago (2014-07-14 19:41:29 UTC) #7
byungchul
On 2014/07/14 19:41:29, mmenke wrote: > So one issue remains - expecting reads/writes to be ...
6 years, 5 months ago (2014-07-14 22:47:14 UTC) #8
byungchul
On 2014/07/14 22:47:14, byungchul wrote: > On 2014/07/14 19:41:29, mmenke wrote: > > So one ...
6 years, 5 months ago (2014-07-14 22:56:49 UTC) #9
mmenke
https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode97 net/socket/unix_domain_client_socket_posix_unittest.cc:97: return write_buf->BytesConsumed(); Still theoretically possible for these both to ...
6 years, 5 months ago (2014-07-15 15:25:57 UTC) #10
byungchul
https://codereview.chromium.org/376323002/diff/40001/net/socket/unix_domain_server_socket_posix_unittest.cc File net/socket/unix_domain_server_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/40001/net/socket/unix_domain_server_socket_posix_unittest.cc#newcode27 net/socket/unix_domain_server_socket_posix_unittest.cc:27: bool UserCanConnectCallback(bool allow_user, uid_t uid, gid_t gid) { On ...
6 years, 5 months ago (2014-07-15 17:30:45 UTC) #11
mmenke
Quick responses. Interview soon, so may not get back to this until tomorrow. https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc File ...
6 years, 5 months ago (2014-07-15 17:44:41 UTC) #12
byungchul
https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode189 net/socket/unix_domain_client_socket_posix_unittest.cc:189: client_socket.Connect(connect_callback.callback())); On 2014/07/15 17:44:41, mmenke wrote: > On 2014/07/15 ...
6 years, 5 months ago (2014-07-15 18:07:01 UTC) #13
mmenke
https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode97 net/socket/unix_domain_client_socket_posix_unittest.cc:97: return write_buf->BytesConsumed(); On 2014/07/15 17:30:45, byungchul wrote: > On ...
6 years, 5 months ago (2014-07-15 19:12:57 UTC) #14
byungchul
https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/120001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode97 net/socket/unix_domain_client_socket_posix_unittest.cc:97: return write_buf->BytesConsumed(); On 2014/07/15 19:12:57, mmenke wrote: > On ...
6 years, 5 months ago (2014-07-15 22:01:18 UTC) #15
mmenke
I want to do a final once over later today, but I'm pretty much ready ...
6 years, 5 months ago (2014-07-16 18:30:36 UTC) #16
byungchul
https://codereview.chromium.org/376323002/diff/160001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/160001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode197 net/socket/unix_domain_client_socket_posix_unittest.cc:197: EXPECT_EQ(OK, ConnectSynchronously(&client_socket)); On 2014/07/16 18:30:35, mmenke wrote: > This ...
6 years, 5 months ago (2014-07-16 22:02:31 UTC) #17
mmenke
Looks like you have failing tests, and don't forget to rename the unix_domain_socket_posix files again.
6 years, 5 months ago (2014-07-17 15:42:22 UTC) #18
byungchul
On 2014/07/17 15:42:22, mmenke wrote: > Looks like you have failing tests, and don't forget ...
6 years, 5 months ago (2014-07-22 21:49:47 UTC) #19
mmenke
LGTM! No need to rush to land and merge it into your other CL (Though ...
6 years, 5 months ago (2014-07-23 18:52:41 UTC) #20
mmenke
https://codereview.chromium.org/376323002/diff/240001/net/socket/unix_domain_client_socket_posix.cc File net/socket/unix_domain_client_socket_posix.cc (right): https://codereview.chromium.org/376323002/diff/240001/net/socket/unix_domain_client_socket_posix.cc#newcode40 net/socket/unix_domain_client_socket_posix.cc:40: size_t path_max = address->addr_len - offsetof(struct sockaddr_un, sun_path); On ...
6 years, 5 months ago (2014-07-23 18:54:35 UTC) #21
byungchul
https://codereview.chromium.org/376323002/diff/240001/net/socket/unix_domain_client_socket_posix.cc File net/socket/unix_domain_client_socket_posix.cc (right): https://codereview.chromium.org/376323002/diff/240001/net/socket/unix_domain_client_socket_posix.cc#newcode40 net/socket/unix_domain_client_socket_posix.cc:40: size_t path_max = address->addr_len - offsetof(struct sockaddr_un, sun_path); On ...
6 years, 5 months ago (2014-07-23 22:27:12 UTC) #22
byungchul
@darin, Could you please review this CL for name change of unix domain socket from ...
6 years, 5 months ago (2014-07-23 22:34:39 UTC) #23
darin (slow to review)
LGTM, but... If you are trying to kill off the old class, I might have ...
6 years, 5 months ago (2014-07-23 22:39:47 UTC) #24
byungchul
On 2014/07/23 22:39:47, darin wrote: > LGTM, but... > > If you are trying to ...
6 years, 5 months ago (2014-07-23 22:51:42 UTC) #25
mmenke
On 2014/07/23 22:51:42, byungchul wrote: > On 2014/07/23 22:39:47, darin wrote: > > LGTM, but... ...
6 years, 5 months ago (2014-07-23 23:50:50 UTC) #26
byungchul
Moved UnixDomainListenSocket into net::deprecated namespace. https://codereview.chromium.org/376323002/diff/260001/net/socket/unix_domain_client_socket_posix_unittest.cc File net/socket/unix_domain_client_socket_posix_unittest.cc (right): https://codereview.chromium.org/376323002/diff/260001/net/socket/unix_domain_client_socket_posix_unittest.cc#newcode371 net/socket/unix_domain_client_socket_posix_unittest.cc:371: EXPECT_EQ(kSmallReadBufferSize, read_callback.WaitForResult()); On 2014/07/23 ...
6 years, 5 months ago (2014-07-24 00:30:22 UTC) #27
byungchul
The CQ bit was checked by byungchul@chromium.org
6 years, 5 months ago (2014-07-24 00:31:52 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/byungchul@chromium.org/376323002/280001
6 years, 5 months ago (2014-07-24 00:33:19 UTC) #29
commit-bot: I haz the power
6 years, 5 months ago (2014-07-24 03:51:36 UTC) #30
Message was sent while issue was closed.
Change committed as 285148

Powered by Google App Engine
This is Rietveld 408576698