diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 07:07:49 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 07:07:49 +0000 |
commit | d80a432e2201c81d60508d8399129063baa63982 (patch) | |
tree | 00106740b6f9547148411a97fcc1328cc66b13c7 /net/http | |
parent | b8c904a326b28ad76146ab2a7366b2bbc2edaab9 (diff) | |
download | chromium_src-d80a432e2201c81d60508d8399129063baa63982.zip chromium_src-d80a432e2201c81d60508d8399129063baa63982.tar.gz chromium_src-d80a432e2201c81d60508d8399129063baa63982.tar.bz2 |
Make ClientSocketPool/ClientSocketPoolBase/ClientSocketHandle more generic.
This is in preparation for creating an SSLClientSocketPool.
ClientSocketPoolBase is now templated. Most of the implementation has moved to ClientSocketPoolBaseHelper which is not templated.
In order to make this possible, ClientSocketPoolBaseHelper's internal data structures do not use the full concrete Request type, but rather use a pointer to Request.
ClientSocketPoolBase takes a SocketParams as a template argument, primarily to allow RequestSocket to take a templated parameter that contains all the information necessary to connect the socket (be it TCP or SSL or whatever).
ClientSocketPool::RequestSocket() and ClientSocketHandle::Init() have been templated as well to handle this case.
I've left adding run-time type safety checks as a TODO.
TEST=net_unittests
BUG=http://crbug.com/13289
Review URL: http://codereview.chromium.org/160621
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index 91c0d0b..e298f64 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -169,8 +169,12 @@ class CaptureGroupNameSocketPool : public ClientSocketPool { public: CaptureGroupNameSocketPool() { } + const std::string last_group_name_received() const { + return last_group_name_; + } + virtual int RequestSocket(const std::string& group_name, - const HostResolver::RequestInfo& resolve_info, + const void* socket_params, int priority, ClientSocketHandle* handle, CompletionCallback* callback, @@ -178,11 +182,6 @@ class CaptureGroupNameSocketPool : public ClientSocketPool { last_group_name_ = group_name; return ERR_IO_PENDING; } - - const std::string last_group_name_received() const { - return last_group_name_; - } - virtual void CancelRequest(const std::string& group_name, const ClientSocketHandle* handle) { } virtual void ReleaseSocket(const std::string& group_name, @@ -201,7 +200,8 @@ class CaptureGroupNameSocketPool : public ClientSocketPool { const ClientSocketHandle* handle) const { return LOAD_STATE_IDLE; } - protected: + + private: std::string last_group_name_; }; |