diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-13 22:37:16 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-13 22:37:16 +0000 |
commit | d9da5fe263e748c75d85816ee6bae46b2b9de9c9 (patch) | |
tree | f6dbf611550dc1118fcff2cfe9429ca721a5c1bf /net/socket/socket_test_util.h | |
parent | a691b8874c225cf530396661264a77159db38780 (diff) | |
download | chromium_src-d9da5fe263e748c75d85816ee6bae46b2b9de9c9.zip chromium_src-d9da5fe263e748c75d85816ee6bae46b2b9de9c9.tar.gz chromium_src-d9da5fe263e748c75d85816ee6bae46b2b9de9c9.tar.bz2 |
Integrate the SpdyProxyClientSocket into the HttpStreamRequest
to support fetching HTTPS URLS over a SPDY Proxy.
BUG=29625
TEST=HttpNetworkTransactionTest.HttpsProxySpdyConnect
Review URL: http://codereview.chromium.org/3417010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62468 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socket_test_util.h')
-rw-r--r-- | net/socket/socket_test_util.h | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index 7293c05..eb54b84 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h @@ -92,6 +92,11 @@ struct MockRead { result(0), data(data), data_len(data_len), sequence_number(0), time_stamp(base::Time::Now()) { } + // Read success (inferred data length) with sequence information. + MockRead(bool async, int seq, const char* data) : async(async), + result(0), data(data), data_len(strlen(data)), sequence_number(seq), + time_stamp(base::Time::Now()) { } + // Read success with sequence information. MockRead(bool async, const char* data, int data_len, int seq) : async(async), result(0), data(data), data_len(data_len), sequence_number(seq), @@ -923,62 +928,6 @@ extern const int kSOCKS5OkRequestLength; extern const char kSOCKS5OkResponse[]; extern const int kSOCKS5OkResponseLength; -class MockSSLClientSocketPool : public SSLClientSocketPool { - public: - class MockConnectJob { - public: - MockConnectJob(ClientSocket* socket, ClientSocketHandle* handle, - CompletionCallback* callback); - - int Connect(); - bool CancelHandle(const ClientSocketHandle* handle); - - private: - void OnConnect(int rv); - - scoped_ptr<ClientSocket> socket_; - ClientSocketHandle* handle_; - CompletionCallback* user_callback_; - CompletionCallbackImpl<MockConnectJob> connect_callback_; - - DISALLOW_COPY_AND_ASSIGN(MockConnectJob); - }; - - MockSSLClientSocketPool( - int max_sockets, - int max_sockets_per_group, - ClientSocketPoolHistograms* histograms, - ClientSocketFactory* socket_factory, - TCPClientSocketPool* tcp_pool); - - virtual ~MockSSLClientSocketPool(); - - int release_count() const { return release_count_; } - int cancel_count() const { return cancel_count_; } - - // SSLClientSocketPool methods. - virtual int RequestSocket(const std::string& group_name, - const void* socket_params, - RequestPriority priority, - ClientSocketHandle* handle, - CompletionCallback* callback, - const BoundNetLog& net_log); - - virtual void CancelRequest(const std::string& group_name, - ClientSocketHandle* handle); - virtual void ReleaseSocket(const std::string& group_name, - ClientSocket* socket, int id); - - private: - ClientSocketFactory* client_socket_factory_; - int release_count_; - int cancel_count_; - ScopedVector<MockConnectJob> job_list_; - - DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocketPool); -}; - - } // namespace net #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |