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

Issue 2647003: Do not attempt to reuse active sockets after a socket pool flush (usually a network change). (Closed)

Created:
10 years, 6 months ago by willchan no longer on Chromium
Modified:
9 years, 7 months ago
Reviewers:
eroman
CC:
chromium-reviews
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Do not attempt to reuse active sockets after a socket pool flush (usually a network change). Implements this functionality by adding an |id_| field to ClientSocketPoolBaseHelper that is incremented on each Flush(). BUG=45872 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49076

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address eroman comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -39 lines) Patch
M net/http/http_cache.cc View 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_network_session.h View 1 chunk +0 lines, -4 lines 0 comments Download
M net/http/http_network_session.cc View 1 chunk +0 lines, -10 lines 0 comments Download
M net/socket/client_socket_handle.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M net/socket/client_socket_handle.cc View 3 chunks +3 lines, -1 line 0 comments Download
M net/socket/client_socket_pool.h View 1 1 chunk +12 lines, -2 lines 0 comments Download
M net/socket/client_socket_pool_base.h View 1 6 chunks +17 lines, -5 lines 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 7 chunks +12 lines, -6 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 2 chunks +31 lines, -2 lines 0 comments Download
M net/socket/socks_client_socket_pool.h View 1 chunk +4 lines, -1 line 0 comments Download
M net/socket/socks_client_socket_pool.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M net/socket/socks_client_socket_pool_unittest.cc View 1 2 chunks +4 lines, -1 line 0 comments Download
M net/socket/tcp_client_socket_pool.h View 1 chunk +4 lines, -1 line 0 comments Download
M net/socket/tcp_client_socket_pool.cc View 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
willchan no longer on Chromium
10 years, 6 months ago (2010-06-04 19:31:24 UTC) #1
eroman
http://codereview.chromium.org/2647003/diff/1/11 File net/socket/socks_client_socket_pool.cc (right): http://codereview.chromium.org/2647003/diff/1/11#newcode199 net/socket/socks_client_socket_pool.cc:199: int id) { Is there a more specific name ...
10 years, 6 months ago (2010-06-04 22:43:44 UTC) #2
willchan no longer on Chromium
http://codereview.chromium.org/2647003/diff/1/11 File net/socket/socks_client_socket_pool.cc (right): http://codereview.chromium.org/2647003/diff/1/11#newcode199 net/socket/socks_client_socket_pool.cc:199: int id) { On 2010/06/04 22:43:44, eroman wrote: > ...
10 years, 6 months ago (2010-06-04 22:55:13 UTC) #3
eroman
lgtm http://codereview.chromium.org/2647003/diff/1/6 File net/socket/client_socket_handle.h (right): http://codereview.chromium.org/2647003/diff/1/6#newcode146 net/socket/client_socket_handle.h:146: int pool_id_; Can you document this? (or point ...
10 years, 6 months ago (2010-06-04 23:09:18 UTC) #4
willchan no longer on Chromium
10 years, 6 months ago (2010-06-04 23:27:53 UTC) #5
http://codereview.chromium.org/2647003/diff/1/6
File net/socket/client_socket_handle.h (right):

http://codereview.chromium.org/2647003/diff/1/6#newcode146
net/socket/client_socket_handle.h:146: int pool_id_;
On 2010/06/04 23:09:18, eroman wrote:
> Can you document this? (or point to the other file where it is explained).

Done.

http://codereview.chromium.org/2647003/diff/1/7
File net/socket/client_socket_pool.h (right):

http://codereview.chromium.org/2647003/diff/1/7#newcode79
net/socket/client_socket_pool.h:79: // idle, active, and connecting sockets are
discarded.  Active sockets being
On 2010/06/04 23:09:18, eroman wrote:
> nit: I wouldn't mention "active" sockets as being discarded in the second
> phrase. But rather let the following one explain how any active sockets will
be
> discarded once they are returned to the pool.

Done.

http://codereview.chromium.org/2647003/diff/1/11
File net/socket/socks_client_socket_pool.cc (right):

http://codereview.chromium.org/2647003/diff/1/11#newcode199
net/socket/socks_client_socket_pool.cc:199: int id) {
On 2010/06/04 23:09:18, eroman wrote:
> On 2010/06/04 22:55:13, willchan wrote:
> > On 2010/06/04 22:43:44, eroman wrote:
> > > Is there a more specific name than "id" that can be used? Some of the
ideas
> I
> > > came up with to convey whose identifier this really is:
> > > 
> > > |pool_generation_number|
> > > |pool_generation|
> > > |parent_pool_generation|
> > 
> > I chose |id_| for consistency with ProxyConfig, which does a similar thing. 
> I'm
> > happy to change it to something else, although I don't really like anything
:P
> 
> > So I guess if you want it changed, I'll just do |pool_generation_number|. 
How
> > does that sound?
> 
> For what its worth, I prefer pool_generation_number over ID, but i'll leave it
> up to you.
> 
> (I don't like ProxyConfig's use of |id| either.)

Fair enough.  I think they all suck :)  Changed.

http://codereview.chromium.org/2647003/diff/1/13
File net/socket/socks_client_socket_pool_unittest.cc (right):

http://codereview.chromium.org/2647003/diff/1/13#newcode127
net/socket/socks_client_socket_pool_unittest.cc:127: release_count_++;
On 2010/06/04 23:09:18, eroman wrote:
> Can you assert that id == 1?

Done.

Powered by Google App Engine
This is Rietveld 408576698