summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_handle.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 18:22:24 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 18:22:24 +0000
commita7e38577aab81d13d9fc1dff5a8b6fe164ed2102 (patch)
tree03c3e30bd44f33a4317bbe5606f9c0e40c27ce40 /net/socket/client_socket_handle.h
parentb846acde84543772099763542d9411eacbe684f9 (diff)
downloadchromium_src-a7e38577aab81d13d9fc1dff5a8b6fe164ed2102.zip
chromium_src-a7e38577aab81d13d9fc1dff5a8b6fe164ed2102.tar.gz
chromium_src-a7e38577aab81d13d9fc1dff5a8b6fe164ed2102.tar.bz2
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 Review URL: http://codereview.chromium.org/2647003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_handle.h')
-rw-r--r--net/socket/client_socket_handle.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h
index 4b36e58..13095ab 100644
--- a/net/socket/client_socket_handle.h
+++ b/net/socket/client_socket_handle.h
@@ -93,6 +93,7 @@ class ClientSocketHandle {
void set_is_reused(bool is_reused) { is_reused_ = is_reused; }
void set_socket(ClientSocket* s) { socket_.reset(s); }
void set_idle_time(base::TimeDelta idle_time) { idle_time_ = idle_time; }
+ void set_pool_id(int id) { pool_id_ = id; }
// These may only be used if is_initialized() is true.
const std::string& group_name() const { return group_name_; }
@@ -142,6 +143,7 @@ class ClientSocketHandle {
CompletionCallbackImpl<ClientSocketHandle> callback_;
CompletionCallback* user_callback_;
base::TimeDelta idle_time_;
+ int pool_id_; // See ClientSocketPool::ReleaseSocket() for an explanation.
base::TimeTicks init_time_;
base::TimeDelta setup_time_;