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

Unified Diff: net/base/tcp_client_socket_pool.h

Issue 125107: * Move the global "DnsResolutionObserver" code depended on by DNS prefetcher,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 11 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
« no previous file with comments | « net/base/ssl_test_util.cc ('k') | net/base/tcp_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/tcp_client_socket_pool.h
===================================================================
--- net/base/tcp_client_socket_pool.h (revision 18360)
+++ net/base/tcp_client_socket_pool.h (working copy)
@@ -31,8 +31,7 @@
// ClientSocketPool methods:
virtual int RequestSocket(const std::string& group_name,
- const std::string& host,
- int port,
+ const HostResolver::RequestInfo& resolve_info,
int priority,
ClientSocketHandle* handle,
CompletionCallback* callback);
@@ -62,11 +61,22 @@
// A Request is allocated per call to RequestSocket that results in
// ERR_IO_PENDING.
struct Request {
+ // HostResolver::RequestInfo has no default constructor, so fudge something.
+ Request() : resolve_info(std::string(), 0) {}
+
+ Request(ClientSocketHandle* handle,
+ CompletionCallback* callback,
+ int priority,
+ const HostResolver::RequestInfo& resolve_info,
+ LoadState load_state)
+ : handle(handle), callback(callback), priority(priority),
+ resolve_info(resolve_info), load_state(load_state) {
+ }
+
ClientSocketHandle* handle;
CompletionCallback* callback;
int priority;
- std::string host;
- int port;
+ HostResolver::RequestInfo resolve_info;
LoadState load_state;
};
@@ -118,7 +128,7 @@
// 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.
- int Connect(const std::string& host, int port);
+ int Connect(const HostResolver::RequestInfo& resolve_info);
// Called by the TCPClientSocketPool to cancel this ConnectingSocket. Only
// necessary if a ClientSocketHandle is reused.
« no previous file with comments | « net/base/ssl_test_util.cc ('k') | net/base/tcp_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698