summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_proxy_client_socket_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Refactor HttpStreamFactory.willchan@chromium.org2011-02-231-9/+8
| | | | | | | | | | | | | | | | | | | Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest. Rename HttpStreamFactory to HttpStreamFactoryImpl. Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here). Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist. Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness. I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup. BUG=54371,42669 TEST=unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75668 Review URL: http://codereview.chromium.org/6543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75688 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 75668 for breaking ChromeOS build - Refactor HttpStreamFactory.willchan@chromium.org2011-02-231-8/+9
| | | | | | | | | | | | | | | | | | | Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest. Rename HttpStreamFactory to HttpStreamFactoryImpl. Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here). Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist. Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness. I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup. BUG=54371,42669 TEST=unit tests Review URL: http://codereview.chromium.org/6543004 TBR=willchan@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75670 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpStreamFactory.willchan@chromium.org2011-02-221-9/+8
| | | | | | | | | | | | | | | | | Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest. Rename HttpStreamFactory to HttpStreamFactoryImpl. Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here). Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist. Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness. I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup. BUG=54371,42669 TEST=unit tests Review URL: http://codereview.chromium.org/6543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75668 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpNetworkSession construction.willchan@chromium.org2011-02-031-0/+1
| | | | | | | | | | | Introduce HttpNetworkSession::Params. This should make it easy to add new optionally NULL parameters. I also took this opportunity to eliminate some copy/pastes of TestURLRequestContext and make them use the original. I was also able to remove the need for ClientSocketFactory::GetDefaultFactory() calls and new SpdySessionPool() calls in most places. BUG=none TEST=none Review URL: http://codereview.chromium.org/6349028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73669 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Use AUTH_SCHEME enum instead of a string.cbentzel@chromium.org2011-01-131-2/+7
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6191001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71318 0039d316-1c4b-4281-b951-d872f2087c98
* Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS proxyrch@chromium.org2010-12-171-3/+5
| | | | | | | | | | | | | | | | | to be consumed by chrome. Among other things, this will allow the proxy to inform the user that the hostname could not be resolved or similar conditions. This adds a new OnHttpsProxyTunnelConnectionResponse method to StreamRequest::Delegate which is invoked when an HTTPS proxy returns a non-200, non-407 response. The method is called with an HttpResponseInfor argument to access the request headers, and an HttpStream argument to access the response body. BUG=none TEST=HttpNetworkTransactionTest Review URL: http://codereview.chromium.org/4935001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69513 0039d316-1c4b-4281-b951-d872f2087c98
* Move BuildRequestHeaders from HttpNetworkTransaction to rch@chromium.org2010-10-201-2/+0
| | | | | | | | | | | | | HttpUtil::BuildRequestHeaders, so that it can be used directly by SpdyHttpStream, removing the code duplication. Strip proxy-connection header from SPDY requests to be consistent with Connection header. BUG=none TEST=none Review URL: http://codereview.chromium.org/3831005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63213 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate the SpdyProxyClientSocket into the HttpStreamRequestrch@chromium.org2010-10-131-2/+128
| | | | | | | | | | | 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
* Fix a bug in SpdyProxyClientSocket::PopulateUserBuffer, whererch@chromium.org2010-10-071-0/+34
| | | | | | | | | | | | subsequent reads from the same buffered data could result in a crash. BUG=none TEST=SpdyProxyClientSocketTest.MultipleReadsFromSameLargeFrame Review URL: http://codereview.chromium.org/3549022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61758 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up DeterministicSocketData class. Add unit tests to documentrch@chromium.org2010-10-051-75/+120
| | | | | | | | | | | | the correct usage of the class. Enable the class to support async writes. BUG=none TEST=none Review URL: http://codereview.chromium.org/3614002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61531 0039d316-1c4b-4281-b951-d872f2087c98
* Clarify the semantics of Socket::Read() and Socket::Write(), rch@chromium.org2010-10-051-2/+4
| | | | | | | | | | | | | | | particularly as they related to closed / disconnected sockets. Added a new ERR_SOCKET_NOT_CONNECTED error which is now returned by GetPeerAddress. This addresses wtc's feedback on CL 3421028. BUG=56423,56426 TEST=none Review URL: http://codereview.chromium.org/3384034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61471 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes the tests written for http://codereview.chromium.org/3432009/showrch@chromium.org2010-10-011-0/+955
| | | | | | | | | | | | | | | | | | to use DeterministicSocketData which should avoid the flaky test problem that 3432009 introduced. -- Add a new class SpdyProxyClientSocket which implements ClientSocket by sending a CONNECT request via a SPDY SYN_STREAM frame to a SPDY proxy, and then reading/writing data to/from SPDY Data frames. BUG=29625 TEST=none Review URL: http://codereview.chromium.org/3578002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61144 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 60747 - Add a new class SpdyProxyClientSocket which implements ↵rch@chromium.org2010-09-281-894/+0
| | | | | | | | | | | | | | | | | ClientSocket by sending a CONNECT request via a SPDY SYN_STREAM frame to a SPDY proxy, and then reading/writing data to/from SPDY Data frames. BUG=29625 TEST=none Review URL: http://codereview.chromium.org/3432009 TBR=rch@chromium.org Review URL: http://codereview.chromium.org/3391029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60754 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new class SpdyProxyClientSocket which implements ClientSocketrch@chromium.org2010-09-281-0/+894
by sending a CONNECT request via a SPDY SYN_STREAM frame to a SPDY proxy, and then reading/writing data to/from SPDY Data frames. BUG=29625 TEST=none Review URL: http://codereview.chromium.org/3432009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60747 0039d316-1c4b-4281-b951-d872f2087c98