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

Unified Diff: net/socket/tcp_client_socket_pool.h

Issue 1808001: Implement a 15 connection per proxy server limit. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Remove extra newline. Created 10 years, 8 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/tcp_client_socket_pool.h
diff --git a/net/socket/tcp_client_socket_pool.h b/net/socket/tcp_client_socket_pool.h
index 76950c393f1ca9f6ac4ff842e0d53281411f408b..30158f65d5f72698faff9a590a8b120d452d8aff 100644
--- a/net/socket/tcp_client_socket_pool.h
+++ b/net/socket/tcp_client_socket_pool.h
@@ -12,6 +12,7 @@
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "base/timer.h"
+#include "net/base/host_port_pair.h"
#include "net/base/host_resolver.h"
#include "net/socket/client_socket_pool_base.h"
#include "net/socket/client_socket_pool.h"
@@ -22,9 +23,24 @@ class ClientSocketFactory;
class TCPSocketParams {
public:
+ TCPSocketParams(const HostPortPair& host_port_pair, RequestPriority priority,
+ const GURL& referrer, bool disable_resolver_cache)
+ : destination_(host_port_pair.host, host_port_pair.port) {
+ Initialize(priority, referrer, disable_resolver_cache);
+ }
+
+ // TODO(willchan): Update all unittests so we don't need this.
TCPSocketParams(const std::string& host, int port, RequestPriority priority,
const GURL& referrer, bool disable_resolver_cache)
: destination_(host, port) {
+ Initialize(priority, referrer, disable_resolver_cache);
+ }
+
+ HostResolver::RequestInfo destination() const { return destination_; }
+
+ private:
+ void Initialize(RequestPriority priority, const GURL& referrer,
+ bool disable_resolver_cache) {
// The referrer is used by the DNS prefetch system to correlate resolutions
// with the page that triggered them. It doesn't impact the actual addresses
// that we resolve to.
@@ -34,9 +50,6 @@ class TCPSocketParams {
destination_.set_allow_cached_response(false);
}
- HostResolver::RequestInfo destination() const { return destination_; }
-
- private:
HostResolver::RequestInfo destination_;
};

Powered by Google App Engine
This is Rietveld 408576698