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

Unified Diff: net/socket/client_socket_pool_manager.h

Issue 1051023003: Change ClientSocketPoolManager::InitSocketHandleForHttpRequest and friends (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 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
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_manager.h
diff --git a/net/socket/client_socket_pool_manager.h b/net/socket/client_socket_pool_manager.h
index 12154809870240577c0faaa17ede820f7f7ad0b8..45ed401a0cd8a887436876bffe81673827931042 100644
--- a/net/socket/client_socket_pool_manager.h
+++ b/net/socket/client_socket_pool_manager.h
@@ -44,6 +44,15 @@ enum DefaultMaxValues { kDefaultMaxSocketsPerProxyServer = 32 };
class NET_EXPORT_PRIVATE ClientSocketPoolManager {
public:
+ enum SocketGroupType {
+ SSL_GROUP, // For all TLS sockets.
+ NORMAL_GROUP, // For normal HTTP sockets.
+ FTP_GROUP // For FTP sockets (over an HTTP proxy).
+ };
+
+ // Returns the correct socket group type for |scheme|.
+ static SocketGroupType GroupTypeFromScheme(const std::string& scheme);
+
ClientSocketPoolManager();
virtual ~ClientSocketPoolManager();
@@ -89,8 +98,14 @@ class NET_EXPORT_PRIVATE ClientSocketPoolManager {
// |resolution_callback| will be invoked after the the hostname is
// resolved. If |resolution_callback| does not return OK, then the
// connection will be aborted with that value.
+// If |want_spdy_over_ssl| is true, then after the SSL handshake is complete,
+// SPDY must have been negotiated or else it will be considered an error.
+// If |force_spdy_over_ssl| is true, then SPDY will be assumed to be supported
+// for all SSL connections.
+// TODO(rch): remove force_spdy_over_ssl.
int InitSocketHandleForHttpRequest(
- const GURL& request_url,
+ ClientSocketPoolManager::SocketGroupType group_type,
+ const HostPortPair& endpoint,
const HttpRequestHeaders& request_extra_headers,
int request_load_flags,
RequestPriority request_priority,
@@ -116,7 +131,8 @@ int InitSocketHandleForHttpRequest(
// connection will be aborted with that value.
// This function uses WEBSOCKET_SOCKET_POOL socket pools.
int InitSocketHandleForWebSocketRequest(
- const GURL& request_url,
+ ClientSocketPoolManager::SocketGroupType group_type,
+ const HostPortPair& endpoint,
const HttpRequestHeaders& request_extra_headers,
int request_load_flags,
RequestPriority request_priority,
@@ -165,7 +181,8 @@ NET_EXPORT int InitSocketHandleForTlsConnect(
// Similar to InitSocketHandleForHttpRequest except that it initiates the
// desired number of preconnect streams from the relevant socket pool.
int PreconnectSocketsForHttpRequest(
- const GURL& request_url,
+ ClientSocketPoolManager::SocketGroupType group_type,
+ const HostPortPair& endpoint,
const HttpRequestHeaders& request_extra_headers,
int request_load_flags,
RequestPriority request_priority,
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698