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

Unified Diff: net/socket/client_socket_pool_base.h

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: addressing comments Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/client_socket_pool_base.h
===================================================================
--- net/socket/client_socket_pool_base.h (revision 88319)
+++ net/socket/client_socket_pool_base.h (working copy)
@@ -167,6 +167,12 @@
NO_IDLE_SOCKETS = 0x1, // Do not return an idle socket. Create a new one.
};
+ enum ClientSocketReusePolicy {
+ USE_WARMEST_SOCKET = 0,
+ USE_WARM_SOCKET = 1,
+ USE_LAST_ACCESSED_SOCKET = 2,
+ };
+
class NET_TEST Request {
public:
Request(ClientSocketHandle* handle,
@@ -290,6 +296,10 @@
static bool connect_backup_jobs_enabled();
static bool set_connect_backup_jobs_enabled(bool enabled);
+ // Sets the client socket reuse policy (using warmest socket vs. last accessed
+ // socket).
+ static double SetSocketReusePolicy(int policy);
Mike Belshe 2011/06/12 22:10:35 Instead of an int, you could use a ClientSocketReu
Gagan 2011/06/13 03:52:47 was doing that initially, but ran into problems in
+
void EnableConnectBackupJobs();
// ConnectJob::Delegate methods:
@@ -743,6 +753,8 @@
const scoped_ptr<ConnectJobFactory> connect_job_factory_;
};
+ void ApplySocketReuseGroup(int warmest_socket_trial_group,
+ const int* socket_policy);
// Histograms for the pool
ClientSocketPoolHistograms* const histograms_;
internal::ClientSocketPoolBaseHelper helper_;

Powered by Google App Engine
This is Rietveld 408576698