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

Unified Diff: net/socket/tcp_client_socket_pool.h

Issue 160499: Add timeouts for ConnectJobs. Limit ConnectJobs per group to number of Requests per group + 1. (Closed)
Patch Set: Revert the revert. Fix tests. Created 11 years, 5 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
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_pool.h
diff --git a/net/socket/tcp_client_socket_pool.h b/net/socket/tcp_client_socket_pool.h
index 1906dcc7bb039c67a0d5849704ab9fb7b8eb54a0..b07ea68105d07b5df4293e99675989b3abf165b2 100644
--- a/net/socket/tcp_client_socket_pool.h
+++ b/net/socket/tcp_client_socket_pool.h
@@ -10,6 +10,8 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/time.h"
+#include "base/timer.h"
#include "net/socket/client_socket_pool_base.h"
#include "net/socket/client_socket_pool.h"
@@ -24,6 +26,7 @@ class TCPConnectJob : public ConnectJob {
TCPConnectJob(const std::string& group_name,
const HostResolver::RequestInfo& resolve_info,
const ClientSocketHandle* handle,
+ base::TimeDelta timeout_duration,
ClientSocketFactory* client_socket_factory,
HostResolver* host_resolver,
Delegate* delegate);
@@ -31,11 +34,6 @@ class TCPConnectJob : public ConnectJob {
// ConnectJob methods.
- // Begins the host resolution and the TCP connect. Returns OK on success
- // and ERR_IO_PENDING if it cannot immediately service the request.
- // Otherwise, it returns a net error code.
- virtual int Connect();
-
private:
enum State {
kStateResolveHost,
@@ -45,6 +43,11 @@ class TCPConnectJob : public ConnectJob {
kStateNone,
};
+ // Begins the host resolution and the TCP connect. Returns OK on success
+ // and ERR_IO_PENDING if it cannot immediately service the request.
+ // Otherwise, it returns a net error code.
+ virtual int ConnectInternal();
+
void OnIOComplete(int result);
// Runs the state transition loop.
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698