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

Issue 348803003: Refactor tcp socket and unix domain socket. (Closed)

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

Description

Refactor tcp socket. This is a pre-requisite for http server refactoring, https://codereview.chromium.org/296053012/. 1) Introduce SocketLibevent for tcp and unix domain sockets. 2) TCPSocketLibevent utilizes SocketLibevent. 3) For backward compatibility, TCPSocketLibevent::AdoptConnectedSocket() allows the empty address. BUG=371906 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282121

Patch Set 1 #

Patch Set 2 : Fix compilation errors #

Patch Set 3 : Fix unittests and compilation errors #

Patch Set 4 : Fix net_unittests for iOS #

Total comments: 52

Patch Set 5 : Addressing comments #

Total comments: 8

Patch Set 6 : Rebased #

Patch Set 7 : Addressed comments and fixed unittests for chrome os. #

Total comments: 30

Patch Set 8 : Rebased #

Patch Set 9 : Remove unix domain socket change #

Patch Set 10 : Fix commit message #

Total comments: 13

Patch Set 11 : Rebased #

Patch Set 12 : Change logic calling TCPSocketLibevent::RecordFastOpenStatus() #

Patch Set 13 : Call TCPSocketLibevent::RecordFastOpenStatus() always except on ERR_IO_PENDING #

Patch Set 14 : Revert the behavior change of calling RecordFastOpenStatus() #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+958 lines, -629 lines) Patch
M device/bluetooth/bluetooth_socket_net.cc View 1 1 chunk +1 line, -0 lines 2 comments Download
M extensions/browser/api/socket/tcp_socket.cc View 1 2 1 chunk +1 line, -5 lines 0 comments Download
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M net/base/net_util.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/net_util.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/server_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -4 lines 0 comments Download
A net/socket/server_socket.cc View 1 1 chunk +30 lines, -0 lines 0 comments Download
A net/socket/socket_libevent.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +127 lines, -0 lines 0 comments Download
A net/socket/socket_libevent.cc View 1 2 3 4 5 6 7 8 1 chunk +471 lines, -0 lines 0 comments Download
M net/socket/tcp_socket.cc View 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/tcp_socket_libevent.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +34 lines, -82 lines 0 comments Download
M net/socket/tcp_socket_libevent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +256 lines, -538 lines 0 comments Download

Messages

Total messages: 48 (0 generated)
byungchul
Please review this, a pre-requite for https://codereview.chromium.org/296053012/.
6 years, 6 months ago (2014-06-20 08:23:35 UTC) #1
mmenke
On 2014/06/20 08:23:35, byungchul wrote: > Please review this, a pre-requite for > https://codereview.chromium.org/296053012/. May ...
6 years, 6 months ago (2014-06-24 18:14:40 UTC) #2
mmenke
Some comments. I intent to get you more later today, and hopefully get you some ...
6 years, 6 months ago (2014-06-26 15:36:12 UTC) #3
byungchul
https://codereview.chromium.org/348803003/diff/60001/net/socket/server_socket.h File net/socket/server_socket.h (right): https://codereview.chromium.org/348803003/diff/60001/net/socket/server_socket.h#newcode30 net/socket/server_socket.h:30: virtual int ListenWithAddressAndPort(const std::string& address_string, On 2014/06/26 15:36:10, mmenke ...
6 years, 6 months ago (2014-06-26 18:09:24 UTC) #4
mmenke
https://codereview.chromium.org/348803003/diff/70001/net/base/net_util.cc File net/base/net_util.cc (right): https://codereview.chromium.org/348803003/diff/70001/net/base/net_util.cc#newcode512 net/base/net_util.cc:512: addr_len = other.addr_len; You need to initialize addr here. ...
6 years, 6 months ago (2014-06-26 20:04:00 UTC) #5
byungchul
https://codereview.chromium.org/348803003/diff/70001/net/base/net_util.cc File net/base/net_util.cc (right): https://codereview.chromium.org/348803003/diff/70001/net/base/net_util.cc#newcode512 net/base/net_util.cc:512: addr_len = other.addr_len; On 2014/06/26 20:04:00, mmenke wrote: > ...
6 years, 6 months ago (2014-06-27 00:08:36 UTC) #6
byungchul
PTAL
6 years, 5 months ago (2014-06-27 21:38:18 UTC) #7
mmenke
On 2014/06/27 21:38:18, byungchul wrote: > PTAL Will do. Carefully digging through and comparing codepaths ...
6 years, 5 months ago (2014-06-30 16:36:12 UTC) #8
mmenke
On 2014/06/30 16:36:12, mmenke wrote: > On 2014/06/27 21:38:18, byungchul wrote: > > PTAL > ...
6 years, 5 months ago (2014-06-30 16:54:20 UTC) #9
mmenke
On 2014/06/30 16:54:20, mmenke wrote: > On 2014/06/30 16:36:12, mmenke wrote: > > On 2014/06/27 ...
6 years, 5 months ago (2014-06-30 16:54:42 UTC) #10
byungchul
On 2014/06/30 16:54:42, mmenke wrote: > On 2014/06/30 16:54:20, mmenke wrote: > > On 2014/06/30 ...
6 years, 5 months ago (2014-06-30 17:28:13 UTC) #11
mmenke
May not get to the Unix Domain part of the CL today, but if not, ...
6 years, 5 months ago (2014-06-30 18:26:52 UTC) #12
byungchul
https://codereview.chromium.org/348803003/diff/110001/net/base/net_util.cc File net/base/net_util.cc (right): https://codereview.chromium.org/348803003/diff/110001/net/base/net_util.cc#newcode511 net/base/net_util.cc:511: void SockaddrStorage::operator=(const SockaddrStorage& other) { On 2014/06/30 18:26:51, mmenke ...
6 years, 5 months ago (2014-06-30 19:38:35 UTC) #13
byungchul
@rdsmith, Could you please review this CL and advise me especially where RecordFastOpenStatus() should go? ...
6 years, 5 months ago (2014-06-30 19:40:44 UTC) #14
mmenke
I'm happy with this (Though a bit nervous with so much moving stuff around at ...
6 years, 5 months ago (2014-06-30 20:37:43 UTC) #15
byungchul
On 2014/06/30 20:37:43, mmenke wrote: > I'm happy with this (Though a bit nervous with ...
6 years, 5 months ago (2014-06-30 20:40:04 UTC) #16
Randy Smith (Not in Mondays)
On 2014/06/30 at 20:40:04, byungchul wrote: > On 2014/06/30 20:37:43, mmenke wrote: > > I'm ...
6 years, 5 months ago (2014-06-30 20:47:24 UTC) #17
byungchul
On 2014/06/30 20:47:24, rdsmith wrote: > On 2014/06/30 at 20:40:04, byungchul wrote: > > On ...
6 years, 5 months ago (2014-06-30 20:52:48 UTC) #18
mmenke
Other than the histogram and these comments, this LGTM. https://codereview.chromium.org/348803003/diff/170001/net/socket/socket_libevent.h File net/socket/socket_libevent.h (right): https://codereview.chromium.org/348803003/diff/170001/net/socket/socket_libevent.h#newcode46 net/socket/socket_libevent.h:46: ...
6 years, 5 months ago (2014-07-07 19:20:20 UTC) #19
Randy Smith (Not in Mondays)
Just reviewed the one section Matt requested my opinion on; let me know if you ...
6 years, 5 months ago (2014-07-07 19:46:42 UTC) #20
mmenke
https://codereview.chromium.org/348803003/diff/170001/net/socket/tcp_socket.cc File net/socket/tcp_socket.cc (right): https://codereview.chromium.org/348803003/diff/170001/net/socket/tcp_socket.cc#newcode9 net/socket/tcp_socket.cc:9: #include "base/location.h" On 2014/07/07 19:46:42, rdsmith wrote: > I ...
6 years, 5 months ago (2014-07-07 19:57:55 UTC) #21
byungchul
https://codereview.chromium.org/348803003/diff/110001/net/socket/tcp_socket_libevent.cc File net/socket/tcp_socket_libevent.cc (right): https://codereview.chromium.org/348803003/diff/110001/net/socket/tcp_socket_libevent.cc#newcode493 net/socket/tcp_socket_libevent.cc:493: RecordFastOpenStatus(); On 2014/07/07 19:46:41, rdsmith wrote: > On 2014/06/30 ...
6 years, 5 months ago (2014-07-07 21:10:27 UTC) #22
byungchul
Randy, PTAL
6 years, 5 months ago (2014-07-08 00:51:38 UTC) #23
Jana
On 2014/07/08 00:51:38, byungchul wrote: > Randy, PTAL Yes, it seems that the histogram is ...
6 years, 5 months ago (2014-07-08 02:15:29 UTC) #24
Jana
https://codereview.chromium.org/348803003/diff/170001/net/socket/server_socket.h File net/socket/server_socket.h (right): https://codereview.chromium.org/348803003/diff/170001/net/socket/server_socket.h#newcode24 net/socket/server_socket.h:24: // Binds the socket and start listening. Destroy the ...
6 years, 5 months ago (2014-07-08 02:15:41 UTC) #25
byungchul
On 2014/07/08 02:15:29, Jana wrote: > On 2014/07/08 00:51:38, byungchul wrote: > > Randy, PTAL ...
6 years, 5 months ago (2014-07-08 03:43:12 UTC) #26
byungchul
https://codereview.chromium.org/348803003/diff/170001/net/socket/server_socket.h File net/socket/server_socket.h (right): https://codereview.chromium.org/348803003/diff/170001/net/socket/server_socket.h#newcode24 net/socket/server_socket.h:24: // Binds the socket and start listening. Destroy the ...
6 years, 5 months ago (2014-07-08 03:43:23 UTC) #27
Jana
The TFO changes look good to me. I'll LGTM, module Randy concurring.
6 years, 5 months ago (2014-07-08 16:56:31 UTC) #28
byungchul
The CQ bit was checked by byungchul@chromium.org
6 years, 5 months ago (2014-07-08 17:00:20 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/byungchul@chromium.org/348803003/230001
6 years, 5 months ago (2014-07-08 17:01:52 UTC) #30
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 5 months ago (2014-07-08 17:46:04 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-08 17:49:38 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/78547)
6 years, 5 months ago (2014-07-08 17:49:39 UTC) #33
byungchul
@keybuk, please review a simple change in device/bluetooth/bluetooth_socket_net.cc @darin, please review a simple change in ...
6 years, 5 months ago (2014-07-08 17:59:22 UTC) #34
Randy Smith (Not in Mondays)
On 2014/07/08 17:00:20, byungchul wrote: > The CQ bit was checked by mailto:byungchul@chromium.org NOT LGTM. ...
6 years, 5 months ago (2014-07-08 18:51:50 UTC) #35
Randy Smith (Not in Mondays)
On 2014/07/08 02:15:29, Jana wrote: > On 2014/07/08 00:51:38, byungchul wrote: > > Randy, PTAL ...
6 years, 5 months ago (2014-07-08 19:00:46 UTC) #36
Randy Smith (Not in Mondays)
On 2014/07/08 03:43:12, byungchul wrote: > On 2014/07/08 02:15:29, Jana wrote: > > On 2014/07/08 ...
6 years, 5 months ago (2014-07-08 19:03:40 UTC) #37
byungchul
On 2014/07/08 19:03:40, rdsmith wrote: > On 2014/07/08 03:43:12, byungchul wrote: > > On 2014/07/08 ...
6 years, 5 months ago (2014-07-08 20:02:14 UTC) #38
Randy Smith (Not in Mondays)
Thank you. LGTM.
6 years, 5 months ago (2014-07-08 20:09:24 UTC) #39
keybuk
https://codereview.chromium.org/348803003/diff/250001/device/bluetooth/bluetooth_socket_net.cc File device/bluetooth/bluetooth_socket_net.cc (right): https://codereview.chromium.org/348803003/diff/250001/device/bluetooth/bluetooth_socket_net.cc#newcode10 device/bluetooth/bluetooth_socket_net.cc:10: #include "base/location.h" what from this header is used by ...
6 years, 5 months ago (2014-07-08 22:06:26 UTC) #40
mmenke
https://codereview.chromium.org/348803003/diff/250001/device/bluetooth/bluetooth_socket_net.cc File device/bluetooth/bluetooth_socket_net.cc (right): https://codereview.chromium.org/348803003/diff/250001/device/bluetooth/bluetooth_socket_net.cc#newcode10 device/bluetooth/bluetooth_socket_net.cc:10: #include "base/location.h" On 2014/07/08 22:06:26, keybuk wrote: > what ...
6 years, 5 months ago (2014-07-08 22:25:08 UTC) #41
keybuk
lgm
6 years, 5 months ago (2014-07-08 22:46:29 UTC) #42
keybuk
lgtm
6 years, 5 months ago (2014-07-09 18:11:37 UTC) #43
darin (slow to review)
The change to extensions/browser/api/socket/tcp_socket.cc LGTM
6 years, 5 months ago (2014-07-09 19:32:12 UTC) #44
byungchul
The CQ bit was checked by byungchul@chromium.org
6 years, 5 months ago (2014-07-09 19:56:50 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/byungchul@chromium.org/348803003/250001
6 years, 5 months ago (2014-07-09 19:58:04 UTC) #46
commit-bot: I haz the power
Change committed as 282121
6 years, 5 months ago (2014-07-09 21:12:51 UTC) #47
byungchul
6 years, 5 months ago (2014-07-09 22:42:19 UTC) #48
Message was sent while issue was closed.
https://codereview.chromium.org/348803003/diff/110001/net/socket/unix_domain_...
File net/socket/unix_domain_listen_socket_posix.cc (right):

https://codereview.chromium.org/348803003/diff/110001/net/socket/unix_domain_...
net/socket/unix_domain_listen_socket_posix.cc:15: #include <unistd.h>
On 2014/06/30 18:26:51, mmenke wrote:
> nit:  C++ headers should got before C ones.

Done in https://codereview.chromium.org/376323002/.

https://codereview.chromium.org/348803003/diff/110001/net/socket/unix_domain_...
File net/socket/unix_domain_server_socket_posix.h (right):

https://codereview.chromium.org/348803003/diff/110001/net/socket/unix_domain_...
net/socket/unix_domain_server_socket_posix.h:9: #include <string>
On 2014/06/30 18:26:51, mmenke wrote:
> nit:  Blank line between C headers and C++ headers.

Done in https://codereview.chromium.org/376323002/.

Powered by Google App Engine
This is Rietveld 408576698