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

Issue 384873002: This CL changes the lifespan of SSLConnectJobMessengers so that they are created only when needed, (Closed)

Created:
6 years, 5 months ago by mshelley
Modified:
5 years, 4 months ago
Reviewers:
wtc, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@useloop
Project:
chromium
Visibility:
Public.

Description

This CL changes the lifespan of SSlConnectJobMessengers so that they are created only when needed, and deleted as soon as they are no longer necessary. This CL adds methods to SSLClientSocketPool that are passed to the SSLConnectJob and SSLConnectJobMessenger as callbacks. These allow the SSLConnectJob to tell the SSLClientSocketPool to create a messenger for the job when appropriate, and the SSLConnectJobMessenger to tell the SSLCLientSocketPool to remove a messenger when appropriate. An SSLConnectJob will now only create an SSLConnectJobMessenger if its connection's session is not already in the session cache. The messenger will then ask to be removed when there are no remaining pending or connecting sockets in the messenger. BUG=

Patch Set 1 : #

Patch Set 2 : Removed FormatSessionCacheKey function. #

Total comments: 13

Patch Set 3 : Brought this CL up to date with changes in https://codereview.chromium.org/353713005/ #

Patch Set 4 : Gave the SSLClientSocketPool ownership of messengers, and altered scope of adding/deleting messenge… #

Patch Set 5 : Fixed bug in which this feature was no longer disabled without my flag. #

Patch Set 6 : Rebase, fixed issue where messenger field wasn't set to NULL after deletion #

Total comments: 39

Patch Set 7 : Implemented simpler method of nullifying messengers at the correct time. #

Total comments: 25

Patch Set 8 : Added documentation and removed the cache_key argument from ConnectionCompleteCallback #

Total comments: 33

Patch Set 9 : Renamed methods and member vars. #

Total comments: 24

Patch Set 10 : Removed CanProceed method & reordered OnJobComplete to avoid potential issues. #

Total comments: 2

Patch Set 11 : Re-added CanProceed method #

Total comments: 2

Patch Set 12 : Fixed nits #

Total comments: 2

Patch Set 13 : Fixed copiler issue in SSLClientSocketNSS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -81 lines) Patch
M net/socket/socket_test_util.h View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 3 4 5 6 3 chunks +12 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -9 lines 0 comments Download
M net/socket/ssl_client_socket.cc View 1 2 3 4 5 1 chunk +0 lines, -10 lines 0 comments Download
M net/socket/ssl_client_socket_nss.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.h View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -4 lines 0 comments Download
M net/socket/ssl_client_socket_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +41 lines, -21 lines 0 comments Download
M net/socket/ssl_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 14 chunks +63 lines, -34 lines 0 comments Download
M net/socket/transport_client_socket_pool.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (1 generated)
mshelley
6 years, 5 months ago (2014-07-10 20:38:26 UTC) #1
Ryan Sleevi
Quick question: Does this depend on any CLs in progress for review, and/or is affected ...
6 years, 5 months ago (2014-07-10 20:49:32 UTC) #2
mshelley
On 2014/07/10 20:49:32, Ryan Sleevi wrote: > Quick question: Does this depend on any CLs ...
6 years, 5 months ago (2014-07-10 21:00:45 UTC) #3
Ryan Sleevi
OK, my biggest concern here is I think the lifetime responsibilities are a bit too ...
6 years, 5 months ago (2014-07-25 21:40:07 UTC) #4
mshelley
Here I've responded to all of Ryan's CL comments, and made some slight changes to ...
6 years, 4 months ago (2014-07-28 21:05:33 UTC) #5
Ryan Sleevi
https://codereview.chromium.org/384873002/diff/40001/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): https://codereview.chromium.org/384873002/diff/40001/net/socket/ssl_client_socket_nss.cc#newcode2886 net/socket/ssl_client_socket_nss.cc:2886: return ""; On 2014/07/28 21:05:32, mshelley wrote: > On ...
6 years, 4 months ago (2014-07-28 23:47:38 UTC) #6
mshelley
This patch attempts to correct the coupling issues that were mentioned on patch set 2.
6 years, 4 months ago (2014-07-29 02:36:29 UTC) #7
mshelley
6 years, 4 months ago (2014-08-11 21:39:45 UTC) #8
Ryan Sleevi
https://codereview.chromium.org/384873002/diff/160001/net/socket/client_socket_pool_base.cc File net/socket/client_socket_pool_base.cc (right): https://codereview.chromium.org/384873002/diff/160001/net/socket/client_socket_pool_base.cc#newcode1274 net/socket/client_socket_pool_base.cc:1274: SSLConnectJob* job = static_cast<SSLConnectJob*>(*it); This is definitely a layering ...
6 years, 4 months ago (2014-08-12 00:27:43 UTC) #9
wtc
Review comments on patch set 6: This CL is more complicated than I thought, so ...
6 years, 4 months ago (2014-08-12 14:51:01 UTC) #10
mshelley
https://codereview.chromium.org/384873002/diff/160001/net/socket/client_socket_pool_base.cc File net/socket/client_socket_pool_base.cc (right): https://codereview.chromium.org/384873002/diff/160001/net/socket/client_socket_pool_base.cc#newcode1274 net/socket/client_socket_pool_base.cc:1274: SSLConnectJob* job = static_cast<SSLConnectJob*>(*it); On 2014/08/12 00:27:42, Ryan Sleevi ...
6 years, 4 months ago (2014-08-12 21:47:02 UTC) #11
Ryan Sleevi
Much cleaner - and MUCH closer! https://codereview.chromium.org/384873002/diff/200001/net/socket/ssl_client_socket_pool.cc File net/socket/ssl_client_socket_pool.cc (right): https://codereview.chromium.org/384873002/diff/200001/net/socket/ssl_client_socket_pool.cc#newcode153 net/socket/ssl_client_socket_pool.cc:153: ssl_socket = connecting_sockets_.front(); ...
6 years, 4 months ago (2014-08-13 01:02:16 UTC) #12
mshelley
https://codereview.chromium.org/384873002/diff/200001/net/socket/ssl_client_socket_pool.cc File net/socket/ssl_client_socket_pool.cc (right): https://codereview.chromium.org/384873002/diff/200001/net/socket/ssl_client_socket_pool.cc#newcode153 net/socket/ssl_client_socket_pool.cc:153: ssl_socket = connecting_sockets_.front(); On 2014/08/13 01:02:15, Ryan Sleevi wrote: ...
6 years, 4 months ago (2014-08-13 08:10:00 UTC) #13
wtc
Review comments on patch set 8: I'm very happy that you found a solution whose ...
6 years, 4 months ago (2014-08-14 00:46:46 UTC) #14
Ryan Sleevi
https://codereview.chromium.org/384873002/diff/240001/net/socket/ssl_client_socket_pool.h File net/socket/ssl_client_socket_pool.h (right): https://codereview.chromium.org/384873002/diff/240001/net/socket/ssl_client_socket_pool.h#newcode117 net/socket/ssl_client_socket_pool.h:117: typedef base::Callback<void()> ConnectionCompleteCallback; We have a typedef for this ...
6 years, 4 months ago (2014-08-14 01:20:20 UTC) #15
mshelley
https://codereview.chromium.org/384873002/diff/240001/net/socket/ssl_client_socket.h File net/socket/ssl_client_socket.h (right): https://codereview.chromium.org/384873002/diff/240001/net/socket/ssl_client_socket.h#newcode86 net/socket/ssl_client_socket.h:86: // Compute a unique key string for the SSL ...
6 years, 4 months ago (2014-08-14 20:01:37 UTC) #16
wtc
Patch set 9 LGTM. 1. Note the comment marked with "IMPORTANT". That could be a ...
6 years, 4 months ago (2014-08-14 23:26:27 UTC) #17
mshelley
https://codereview.chromium.org/384873002/diff/260001/net/socket/ssl_client_socket_pool.cc File net/socket/ssl_client_socket_pool.cc (right): https://codereview.chromium.org/384873002/diff/260001/net/socket/ssl_client_socket_pool.cc#newcode130 net/socket/ssl_client_socket_pool.cc:130: bool SSLConnectJobMessenger::CanProceed(SSLClientSocket* ssl_socket) { On 2014/08/14 23:26:26, wtc wrote: ...
6 years, 4 months ago (2014-08-15 16:53:06 UTC) #18
wtc
Patch set 10 LGTM. Please add back the CanProceed() method and remove the connecting_sockets() getter ...
6 years, 4 months ago (2014-08-15 18:48:29 UTC) #19
Ryan Sleevi
LGTM % comment nits https://codereview.chromium.org/384873002/diff/300001/net/socket/ssl_client_socket_pool.cc File net/socket/ssl_client_socket_pool.cc (right): https://codereview.chromium.org/384873002/diff/300001/net/socket/ssl_client_socket_pool.cc#newcode131 net/socket/ssl_client_socket_pool.cc:131: // If there are no ...
6 years, 4 months ago (2014-08-15 19:18:48 UTC) #20
mshelley
The CQ bit was checked by mshelley@chromium.org
6 years, 4 months ago (2014-08-15 19:25:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mshelley@chromium.org/384873002/320001
6 years, 4 months ago (2014-08-15 19:29:35 UTC) #22
wtc
Review comments on patch set 12: there is a compilation error in SSLClientSocketNSS. https://codereview.chromium.org/384873002/diff/320001/net/socket/ssl_client_socket_nss.h File ...
6 years, 4 months ago (2014-08-15 21:49:12 UTC) #23
mshelley
The CQ bit was checked by mshelley@chromium.org
6 years, 4 months ago (2014-08-15 22:52:20 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mshelley@chromium.org/384873002/340001
6 years, 4 months ago (2014-08-15 22:56:31 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-16 00:21:52 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-16 00:32:31 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/3911)
6 years, 4 months ago (2014-08-16 00:32:32 UTC) #28
wtc
6 years, 4 months ago (2014-08-16 01:08:21 UTC) #29
We have a compilation error in
chrome/browser/extensions/api/socket/tls_socket_unittest.cc because that file
defines a subclass of SSLClientSocket that needs to define the new
GetSessionCacheKey() method:

../../chrome/browser/extensions/api/socket/tls_socket_unittest.cc:119:50: error:
allocating an object of abstract class type 'extensions::MockSSLClientSocket'
    scoped_ptr<MockSSLClientSocket> ssl_sock(new MockSSLClientSocket);
                                                 ^
../../net/socket/ssl_client_socket.h:87:23: note: unimplemented pure virtual
method 'GetSessionCacheKey' in 'MockSSLClientSocket'
  virtual std::string GetSessionCacheKey() const = 0;

I've cloned this CL in https://codereview.chromium.org/476313004/ and will
continue there.

Powered by Google App Engine
This is Rietveld 408576698