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

Issue 199048: Add methods for setting socket buffers to the Socket (Closed)

Created:
11 years, 3 months ago by Mike Belshe
Modified:
9 years, 5 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), willchan no longer on Chromium, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add methods for setting socket buffers to the Socket class. Also add a few stats counters for TCP read/write stats. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25803

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 15

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -10 lines) Patch
M net/socket/client_socket_pool_base_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M net/socket/socket.h View 1 chunk +10 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/socks5_client_socket.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/socks5_client_socket.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/socket/socks_client_socket.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/socks_client_socket.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_mac.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_mac.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_nss.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_win.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_win.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_libevent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_libevent.cc View 2 3 4 5 1 chunk +17 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_pool_unittest.cc View 1 2 3 4 5 3 chunks +6 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_win.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket_win.cc View 1 2 3 4 5 9 chunks +34 lines, -9 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mike Belshe
11 years, 3 months ago (2009-09-08 22:39:51 UTC) #1
willchan no longer on Chromium
LGTM mod the nits. http://codereview.chromium.org/199048/diff/6001/7010 File net/socket/client_socket_pool_base_unittest.cc (right): http://codereview.chromium.org/199048/diff/6001/7010#newcode45 Line 45: virtual bool SetReceiveBufferSize(int32 size) ...
11 years, 3 months ago (2009-09-09 19:49:50 UTC) #2
Mike Belshe
11 years, 3 months ago (2009-09-09 22:18:56 UTC) #3
http://codereview.chromium.org/199048/diff/6001/7013
File net/socket/tcp_client_socket_libevent.cc (right):

http://codereview.chromium.org/199048/diff/6001/7013#newcode269
Line 269: DCHECK(!rv) << "Could not set socket receive buffer size";
On 2009/09/09 19:49:50, willchan wrote:
> You should also print out errno.

Done.

http://codereview.chromium.org/199048/diff/6001/7013#newcode277
Line 277: DCHECK(!rv) << "Could not set socket send buffer size";
On 2009/09/09 19:49:50, willchan wrote:
> ditto

Done.

http://codereview.chromium.org/199048/diff/6001/7001
File net/socket/tcp_client_socket_win.cc (right):

http://codereview.chromium.org/199048/diff/6001/7001#newcode244
Line 244: static StatsCounter connects("tcp.connect");
On 2009/09/09 19:49:50, willchan wrote:
> You're adding these StatsCounter things too.  You should update your
changelist
> description.

Done.

http://codereview.chromium.org/199048/diff/6001/7001#newcode452
Line 452: int rv = setsockopt(socket_, SOL_SOCKET, SO_RCVBUF,
On 2009/09/09 19:49:50, willchan wrote:
> Your formatting is off here.  From the style guide
>
(http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Function_Calls%29:
> "If the arguments do not all fit on one line, they should be broken up onto
> multiple lines, with each subsequent line aligned with the first argument. Do
> not add spaces after the open paren or before the close paren:"
> 
> Same for your other setsockopt() calls.

Done.

http://codereview.chromium.org/199048/diff/6001/7001#newcode455
Line 455: DCHECK(!rv) << "Could not set socket receive buffer size";
On 2009/09/09 19:49:50, willchan wrote:
> You should probably also print out the errno (or whatever it is in windows,
> WSAGetLastError() or something).

Done.

http://codereview.chromium.org/199048/diff/6001/7001#newcode463
Line 463: DCHECK(!rv) << "Could not set socket send buffer size";
On 2009/09/09 19:49:50, willchan wrote:
> Ditto here.

Done.

http://codereview.chromium.org/199048/diff/6001/7002
File net/socket/tcp_client_socket_win.h (right):

http://codereview.chromium.org/199048/diff/6001/7002#newcode39
Line 39: virtual bool SetSendBufferSize(int32 size);
On 2009/09/09 19:49:50, willchan wrote:
> You should have a newline before the "private:" section.

Done.

Powered by Google App Engine
This is Rietveld 408576698