diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 09:38:56 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 09:38:56 +0000 |
commit | 4a17b67f2da890bc06b78d34be6ede4e0588b150 (patch) | |
tree | bd0e375ee6f89e29b1ecdd62c641d82921f90d85 /net/socket/client_socket.cc | |
parent | a25da7eb6713cd8827a8ea562b8568524b73c18f (diff) | |
download | chromium_src-4a17b67f2da890bc06b78d34be6ede4e0588b150.zip chromium_src-4a17b67f2da890bc06b78d34be6ede4e0588b150.tar.gz chromium_src-4a17b67f2da890bc06b78d34be6ede4e0588b150.tar.bz2 |
Revert 63648 - Revert 63643 - Add Reset to ClientSocket::UseHistory, and call on TCP disconnect.
The failures which caused me to revert the original looked sporadic. Relanding.
The HttpProxyClientSocket reuses the same TcpClientSocket in the case that it is trying to establish a tunnel through
an authenticating proxy, but the proxy closed the TCP connection.
Also, fix SetOmniboxSpeculation on the TCPClientSocket implementations.
BUG=54062
TEST=Tried normal connections to make sure histograms were only emitted once, as well as https tunnels through an authenticating proxy to ensure that the use_history was correctly reset.
Review URL: http://codereview.chromium.org/3360007
TBR=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/4006004
TBR=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/3978008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63716 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket.cc')
-rw-r--r-- | net/socket/client_socket.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/socket/client_socket.cc b/net/socket/client_socket.cc index 6f38eae..6b12841 100644 --- a/net/socket/client_socket.cc +++ b/net/socket/client_socket.cc @@ -58,6 +58,14 @@ ClientSocket::UseHistory::~UseHistory() { EmitPreconnectionHistograms(); } +void ClientSocket::UseHistory::Reset() { + EmitPreconnectionHistograms(); + was_ever_connected_ = false; + was_used_to_convey_data_ = false; + // omnibox_speculation_ and subresource_speculation_ values + // are intentionally preserved. +} + void ClientSocket::UseHistory::EmitPreconnectionHistograms() const { DCHECK(!subresource_speculation_ || !omnibox_speculation_); // 0 ==> non-speculative, never connected. |