summaryrefslogtreecommitdiffstats
path: root/net/http/http_proxy_client_socket_pool.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert 118950 - Allow chrome to handle 407 auth challenges to CONNECT requestsrch@chromium.org2012-02-041-28/+1
| | | | | | | | | | | | | | | | | | | | through HTTPS Proxies. This also changes the mechanism used to restart HttpProxyClientSocket requests with auth. Previously the transport socket would be Disconnected, and then re-Connected (which was not implemented for SSLClientSockets). However, the approach was problematic in the face of, for example, ipv6. The new approach is to close the HttpProxyClientSocket, and request a new socket from the pool. Initially was http://codereview.chromium.org/8502024 which turned out to have problems with NTLM auth. Review URL: http://codereview.chromium.org/9148011 TBR=rch@chromium.org Review URL: https://chromiumcodereview.appspot.com/9310101 git-svn-id: svn://svn.chromium.org/chrome/branches/1025/src@120443 0039d316-1c4b-4281-b951-d872f2087c98
* [Coverity] Change pass-by-value to pass-by-refgroby@chromium.org2012-01-311-1/+1
| | | | | | | | | | | | CID=102968 TBR=rsleevi@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/9159051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119834 0039d316-1c4b-4281-b951-d872f2087c98
* Allow chrome to handle 407 auth challenges to CONNECT requestsrch@chromium.org2012-01-251-1/+28
| | | | | | | | | | | | | | | | | through HTTPS Proxies. This also changes the mechanism used to restart HttpProxyClientSocket requests with auth. Previously the transport socket would be Disconnected, and then re-Connected (which was not implemented for SSLClientSockets). However, the approach was problematic in the face of, for example, ipv6. The new approach is to close the HttpProxyClientSocket, and request a new socket from the pool. Initially was http://codereview.chromium.org/8502024 which turned out to have problems with NTLM auth. Review URL: http://codereview.chromium.org/9148011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118950 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r113405, since it appears to be causing a crash and a hang. Also ↵eroman@chromium.org2012-01-241-13/+2
| | | | | | | | | | reverted r118506 since it is no longer applicable. BUG=109876, 110368, 62364, 92244 Review URL: https://chromiumcodereview.appspot.com/9226039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118788 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert most of net/http.jhawkins@chromium.org2011-12-201-5/+5
| | | | | | | | | | BUG=none TEST=none R=csilv Review URL: http://codereview.chromium.org/8990001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115220 0039d316-1c4b-4281-b951-d872f2087c98
* Added protocol_version negotiated with the server.rtenneti@google.com2011-12-201-0/+3
| | | | | | | | | | | | | protocol_version will be printed by the LoadTimes extension. R=willchan BUG=108134 TEST=network unittests Review URL: http://codereview.chromium.org/8914005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115145 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind().ajwong@chromium.org2011-12-091-1/+2
| | | | | | | | | | | This changes Socket::Read(), Socket::Write, and StreamSocket::Connect() to use CompletionCallback and fixes all users. BUG=none TEST=existing. Review URL: http://codereview.chromium.org/8824006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113825 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 113305 - Revert 113300 - Revert of 112134 of Revert 112130 - Close ↵rtenneti@google.com2011-12-071-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | idle connections / SPDY sessions when needed. Due to the idle connection state being held by different socket pools, it's possible for one socket pool to hold an idle socket in a lower layer socket pool. From the lower level socket pool's perspective, the socket is being "actively" used. From the higher socket pool's (including SpdySession, which is more of a connection manager) perspective, the connection is idle and can be closed if we have hit a limit. Normally this isn't a big deal, except when we have a lot of idle SPDY connections and are connecting via a proxy, so we have low connection limits through the proxy server. We address this problem by allowing lower-level socket pools to tell higher level socket pools to close a socket. Fixed ASAN test failures by removing .Times(1) and .Times(2) from CloseMultipleIdleSocketsHeldByLayeredPoolWhenNeeded unittest (this removes the tests relying on the order of std::set in CloseOneIdleConnectionInLayeredPool). ASAN is prob ably causing the memory allocator to allocate the pools differently. The std::set is ordered by LayeredPool* which is the address of the LayeredPool (willchan). Added NET_EXPORT for layered_pool class defintion to fix windows shared compile. BUG=62364, 92244, 105839 TEST=none Review URL: http://codereview.chromium.org/8340012 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8745007 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8803019 TBR=rtenneti@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113305 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8836002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113405 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 113300 - Revert of 112134 of Revert 112130 - Close idle connections / ↵rtenneti@chromium.org2011-12-071-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPDY sessions when needed. Due to the idle connection state being held by different socket pools, it's possible for one socket pool to hold an idle socket in a lower layer socket pool. From the lower level socket pool's perspective, the socket is being "actively" used. From the higher socket pool's (including SpdySession, which is more of a connection manager) perspective, the connection is idle and can be closed if we have hit a limit. Normally this isn't a big deal, except when we have a lot of idle SPDY connections and are connecting via a proxy, so we have low connection limits through the proxy server. We address this problem by allowing lower-level socket pools to tell higher level socket pools to close a socket. Fixed ASAN test failures by removing .Times(1) and .Times(2) from CloseMultipleIdleSocketsHeldByLayeredPoolWhenNeeded unittest (this removes the tests relying on the order of std::set in CloseOneIdleConnectionInLayeredPool). ASAN is probably causing the memory allocator to allocate the pools differently. The std::set is ordered by LayeredPool* which is the address of the LayeredPool (willchan). BUG=62364,92244, 105839 TEST=none Review URL: http://codereview.chromium.org/8340012 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8745007 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8803019 TBR=rtenneti@chromium.org Review URL: http://codereview.chromium.org/8825014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113305 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of 112134 of Revert 112130 - Close idle connections / SPDY sessions ↵rtenneti@chromium.org2011-12-061-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | when needed. Due to the idle connection state being held by different socket pools, it's possible for one socket pool to hold an idle socket in a lower layer socket pool. From the lower level socket pool's perspective, the socket is being "actively" used. From the higher socket pool's (including SpdySession, which is more of a connection manager) perspective, the connection is idle and can be closed if we have hit a limit. Normally this isn't a big deal, except when we have a lot of idle SPDY connections and are connecting via a proxy, so we have low connection limits through the proxy server. We address this problem by allowing lower-level socket pools to tell higher level socket pools to close a socket. Fixed ASAN test failures by removing .Times(1) and .Times(2) from CloseMultipleIdleSocketsHeldByLayeredPoolWhenNeeded unittest (this removes the tests relying on the order of std::set in CloseOneIdleConnectionInLayeredPool). ASAN is probably causing the memory allocator to allocate the pools differently. The std::set is ordered by LayeredPool* which is the address of the LayeredPool (willchan). BUG=62364,92244, 105839 TEST=none Review URL: http://codereview.chromium.org/8340012 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8745007 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8803019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113300 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 112130 - Close idle connections / SPDY sessions when needed.sail@chromium.org2011-11-301-11/+1
| | | | | | | | | | | | | | | | | Due to the idle connection state being held by different socket pools, it's possible for one socket pool to hold an idle socket in a lower layer socket pool. From the lower level socket pool's perspective, the socket is being "actively" used. From the higher socket pool's (including SpdySession, which is more of a connection manager) perspective, the connection is idle and can be closed if we have hit a limit. Normally this isn't a big deal, except when we have a lot of idle SPDY connections and are connecting via a proxy, so we have low connection limits through the proxy server. We address this problem by allowing lower-level socket pools to tell higher level socket pools to close a socket. BUG=62364,92244, 105839 TEST=none Review URL: http://codereview.chromium.org/8340012 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/8745007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112134 0039d316-1c4b-4281-b951-d872f2087c98
* Close idle connections / SPDY sessions when needed.willchan@chromium.org2011-11-301-1/+11
| | | | | | | | | | | | | | Due to the idle connection state being held by different socket pools, it's possible for one socket pool to hold an idle socket in a lower layer socket pool. From the lower level socket pool's perspective, the socket is being "actively" used. From the higher socket pool's (including SpdySession, which is more of a connection manager) perspective, the connection is idle and can be closed if we have hit a limit. Normally this isn't a big deal, except when we have a lot of idle SPDY connections and are connecting via a proxy, so we have low connection limits through the proxy server. We address this problem by allowing lower-level socket pools to tell higher level socket pools to close a socket. BUG=62364,92244 TEST=none Review URL: http://codereview.chromium.org/8340012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112130 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to net/.avi@chromium.org2011-11-161-21/+26
| | | | | | | | BUG=104314 Review URL: http://codereview.chromium.org/8568021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110231 0039d316-1c4b-4281-b951-d872f2087c98
* Begin CompletionCallback switchover.willchan@chromium.org2011-10-011-2/+2
| | | | | | | | | | | | | Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
* Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE.darin@chromium.org2011-08-121-3/+3
| | | | | | Review URL: http://codereview.chromium.org/7529043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96560 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/values.h into the base namespace. This includes a cros DEPS rolldmazzoni@chromium.org2011-07-121-3/+4
| | | | | | | | | | with a minor change to that code since libcros also uses base/values.h. BUG=88666 TEST=none Review URL: http://codereview.chromium.org/7259019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92208 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to a few more files.rvargas@google.com2011-05-211-2/+4
| | | | | | | | BUG=76997 TEST=NONE Review URL: http://codereview.chromium.org/7056019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86181 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ClientSocket to StreamSocket.sergeyu@chromium.org2011-05-051-1/+1
| | | | | | | | | BUG=80895 TEST=Compiles Review URL: http://codereview.chromium.org/6930014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84167 0039d316-1c4b-4281-b951-d872f2087c98
* Rename a number of classes previously labeled "TCP" to "Transport" inmbelshe@chromium.org2011-04-071-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | preparation for non-TCP transports. This helps because the alternative is to either use non-TCP protocols (like SCTP) in classes which are called "TCPClientSocketPool", or to clone the code as "SCTPClientSocketPool", both of which are less than ideal. For now, we're just testing transports, so the TransportSocketPool classes will determine a single type of transport and just use them. In the future we'll likely need to figure out how to deal with runtime selection of transports, and probably support use of multiple transports either within the same pools or within subpools. But that is for the future. Note that the histograms have some "tcp" references to them. I didn't change these to "transport" yet, because it will effect existing histograms. Renames include: classes: TCPClientSocketPool -> TransportClientSocketPool MockTCPClientSocketPool -> MockTransportClientSocketPool TCPSocketParams -> TransportSocketParams methods (not the exhaustive list): CreateTCPClientSocket() -> CreateTransportClientSocket() DoTCPConnect() -> DoTransportConnect() BUG=none TEST=none Review URL: http://codereview.chromium.org/6804028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80781 0039d316-1c4b-4281-b951-d872f2087c98
* Add ignore limits flag and use for sync requestkristianm@google.com2011-03-301-0/+2
| | | | | | | | | | | | | Letting sync request ignore the socket and group limits when loading to prevent the WebCore thread from locking up. BUG=45986,58703 TEST=No new tests Review URL: http://codereview.chromium.org/6756004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79817 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpStreamFactory.willchan@chromium.org2011-02-231-6/+0
| | | | | | | | | | | | | | | | | | | 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-0/+6
| | | | | | | | | | | | | | | | | | | 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-6/+0
| | | | | | | | | | | | | | | | | 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
* More net/ reordering.erg@google.com2011-01-211-9/+9
| | | | | | | | | | | | | | In addition to the normal method reordering, this patch also deinlines net/base/test_completion_callback.h and places the compiled code in the net_test_support target. Minimization of that header also required adding includes in a few unit tests. BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6341004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72162 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-1/+2
| | | | | | | | | | | | | | | | | 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
* Even more virtual method deinlining.erg@google.com2010-12-131-9/+3
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5741001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69041 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly handle SSL Client Authentication requests when connectingrch@chromium.org2010-11-121-0/+5
| | | | | | | | | | | to an HTTPS/SPDY proxy. Modify SSLClientSocket classes to correctly set the host_and_port field of the cert_request_info. Modify HttpNetworkTransaction to use this field when populating the SSL client auth cache. BUG=59292 TEST=HttpProxyClientSocketPoolTest.SslClientAuth Review URL: http://codereview.chromium.org/4339001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65976 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate the SpdyProxyClientSocket into the HttpStreamRequestrch@chromium.org2010-10-131-0/+21
| | | | | | | | | | | 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
* Add ClientSocketPoolBaseHelper support for preconnect.willchan@chromium.org2010-10-131-0/+5
| | | | | | | | | | | | | | | | | | | Adds a RequestSockets() API to ClientSocketPool interface. - no RequestPriority param, all requests default to LOWEST. - adds a |num_sockets| param to control how many sockets to try to ensure are connected. Adds an implementation for said function in ClientSocketPoolBaseHelper. Adds a new ClientSocketPoolBaseHelper::Flag type to modify socket request behavior. In this case, we bypass idle sockets. Adds a preconnect concept to ConnectJob. This lets normal requests hijack preconnect jobs. Modifies all ClientSocketPool subclasses to support new RequestSockets API(). Adds new tests. No client actually uses this API yet. We need to plumb it up to the preconnect system. BUG=54450 TEST=new tests in ClientSocketPoolBaseTest Review URL: http://codereview.chromium.org/3689004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62365 0039d316-1c4b-4281-b951-d872f2087c98
* Stop refcounting HostResolver.willchan@chromium.org2010-10-011-4/+4
| | | | | | | | | BUG=46049 TEST=none Review URL: http://codereview.chromium.org/3601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61256 0039d316-1c4b-4281-b951-d872f2087c98
* Stop refcounting ClientSocketPool.willchan@chromium.org2010-09-291-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Establishes that HttpNetworkSession owns all the socket pools. Move out all the socket pools into a ClientSocketPoolManager. This is because of the dependency tree amongst socket pools, which dictates the order in which they must be constructed and destructed. In order to better establish it, I moved them out to their own class. HttpNetworkSession owns the ClientSocketPoolManager which owns the pools. We pass the pools as raw pointers everywhere. Note that ClientSocketPoolManager owns more pools than are publicly accessible via its interface. That's because some of them are wrapped by publicly exposed pools. Also, ClientSocketPoolHistograms used to be reference counted. That's because it can be shared by multiple ClientSocketPools. But it's effectively a global as well, so I make their lifetimes persist for the length of ClientSocketPoolManager too. I also removed internal refcounting in ClientSocketPoolBase. I had refcounted it before I knew about ScopedRunnableMethodFactory back when I first started. I cleaned up the unit tests a lot. Back when I was a young padawan, I didn't really know what I was doing, so I copy/pasted a metric asston of code. Turns out most of it was stupid, so I fixed it. I also stopped the use of implementation inheritance with ClientSocketPoolTest because it's discouraged by the style guide and more importantly because it caused the ClientSocketHandles within the TestSocketRequest vector to be destroyed _after_ the pools themselves were destroyed, which is bad since the handles will call pool_->Release() which blows up. BUG=56215,56215 TEST=Existing unit tests Review URL: http://codereview.chromium.org/3389020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60983 0039d316-1c4b-4281-b951-d872f2087c98
* net: Fix incorrect style used in some enumerations.tfarina@chromium.org2010-09-221-7/+7
| | | | | | | | | | | | | | | | | | | Reason: They are using kConstantNaming, however the Chromium style is to use UPPER_CASE_FOR_ENUMS. Also convert some truly constants, like the following: http/http_proxy_client_socket_pool.h: enum { kDrainBodyBufferSize = 1024 }; To: static const int kDrainBodyBufferSize = 1024; BUG=55668 TEST=compiles locally. Review URL: http://codereview.chromium.org/3421026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60155 0039d316-1c4b-4281-b951-d872f2087c98
* Break reference cycle from HttpProxyClientSocket=>HttpNetworkSession=>...willchan@chromium.org2010-09-171-5/+9
| | | | | | | | | | | | Note that this undoes the fix for http://crbug.com/49387 which is now unnecessary without the cycle. Some other miscellaneous cleanup is thrown in here. BUG=55175 TEST=none Review URL: http://codereview.chromium.org/3418018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59873 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing nested socket pools to socket pool info page. Each socket pool ↵mmenke@chromium.org2010-09-081-4/+5
| | | | | | | | | | | should be displayed once and only once. Also, if more than one proxy is in use, socket pools with the same proxy will appear adjacent to each other. BUG=39756 TEST=manual Review URL: http://codereview.chromium.org/3328009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58826 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for speaking SPDY to an HTTPS proxy.rch@chromium.org2010-09-011-0/+1
| | | | | | | | | | | Currently only http urls are supported. BUG=29625 TEST=HttpNetworkTransactionTest.HttpsProxySpdyGet Review URL: http://codereview.chromium.org/3259006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58236 0039d316-1c4b-4281-b951-d872f2087c98
* Sockets page on net-internals now displays some information about the ↵mmenke@chromium.org2010-08-301-0/+5
| | | | | | | | | | current socket pool state. Table padding slightly increased for legibility. TEST=manual BUG=39756 Review URL: http://codereview.chromium.org/3267002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57869 0039d316-1c4b-4281-b951-d872f2087c98
* Attempting to re-land CL 3110006 which turned out to have rch@chromium.org2010-08-251-10/+30
| | | | | | | | | | | | | | | | | | | | | a memory leak. Add support for speaking SSL to an HTTP Proxy, to HttpProxyClientSocketPool (and friends) More information about an HTTPS Proxy can be found here: http://dev.chromium.org/spdy/spdy-proxy This implementation supports both http:// and https:// requests, as well as support for both Proxy and Server auth. BUG=29625 TEST=none Review URL: http://codereview.chromium.org/3112034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57371 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 57333 - Add support for speaking SSL to an HTTP Proxy, todhollowa@chromium.org2010-08-251-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HttpProxyClientSocketPool (and friends) Reverting due to heapcheck issues: http://build.chromium.org/buildbot/memory/builders/Linux%20Heapcheck/builds/7039/steps/heapcheck%20test:%20net/logs/stdio Suppression: { <insert_a_suppression_name_here> Heapcheck:Leak fun:RefCountedBase fun:RefCounted fun:TCPSocketParams fun:net::HttpStreamRequest::DoInitConnection fun:net::HttpStreamRequest::DoLoop fun:net::HttpStreamRequest::RunLoop fun:net::HttpStreamRequest::Start fun:net::HttpStreamFactory::RequestStream fun:net::HttpNetworkTransaction::DoInitStream fun:net::HttpNetworkTransaction::DoLoop fun:net::HttpNetworkTransaction::RestartIgnoringLastError fun:net::HttpNetworkTransactionTest_HTTPSBadCertificateViaHttpsProxy_Test::TestBody fun:testing::Test::Run fun:testing::internal::TestInfoImpl::Run fun:testing::TestCase::Run fun:testing::internal::UnitTestImpl::RunAllTests fun:testing::UnitTest::Run fun:base::TestSuite::Run fun:main fun:__libc_start_main } More information about an HTTPS Proxy can be found here: http://dev.chromium.org/spdy/spdy-proxy This implementation supports both http:// and https:// requests, as well as support for both Proxy and Server auth. BUG=29625 TEST=none Review URL: http://codereview.chromium.org/3110006 TBR=rch@chromium.org Review URL: http://codereview.chromium.org/3134034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57335 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for speaking SSL to an HTTP Proxy, torch@chromium.org2010-08-251-10/+30
| | | | | | | | | | | | | | | | | | HttpProxyClientSocketPool (and friends) More information about an HTTPS Proxy can be found here: http://dev.chromium.org/spdy/spdy-proxy This implementation supports both http:// and https:// requests, as well as support for both Proxy and Server auth. BUG=29625 TEST=none Review URL: http://codereview.chromium.org/3110006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57333 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obviously unneeded forward declarations from headers under ↵viettrungluu@chromium.org2010-08-211-3/+0
| | | | | | | | | | | src/{app,base,net}. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3136025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56995 0039d316-1c4b-4281-b951-d872f2087c98
* Send user agent with CONNECT requests.vandebo@chromium.org2010-08-181-1/+5
| | | | | | | | | BUG=52591 TEST=HttpNetworkTransactionTest.BuildTunnelRequest_UserAgent Review URL: http://codereview.chromium.org/3164024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56621 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a bunch of extra includes.vandebo@chromium.org2010-08-111-3/+3
| | | | | | | | | BUG=extra includes TEST=still compiles Review URL: http://codereview.chromium.org/3125003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55638 0039d316-1c4b-4281-b951-d872f2087c98
* Recommit 54405 - Fix late binding induced mismatch of Socket and AuthControllervandebo@chromium.org2010-08-031-4/+5
| | | | | | | | | | | | | ClientSocketPool treats all pending SocketParams as interchangeable. Therefore they can not contain any connection specific data. This only affects the Http Proxy tunnel case. The lowest risk change to fix this problem is to create the HttpAuthController in the HttpProxyClientSocket. If we get a 407 and need to restart the Tunnel, the pending HttpProxyClientSocket is returned to the HttpNetworkTransaction in the additional error state of the connection and then complete the auth in a pair of states in the HttpNetworkTransaction. This reintroduces a dependency between tunnel setup and the HttpNetworkTransaction, but that will need to be fixed at a later date. Original Review URL: http://codereview.chromium.org/3058013 BUG=49493 TEST=existing unit tests + manually visiting many SSL sites through a kerberized http proxy. Review URL: http://codereview.chromium.org/3029052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54714 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 54405 - Fix late binding induced mismatch of Socket and AuthControllernick@chromium.org2010-08-021-5/+4
| | | | | | | | | | | | | | | | [Reason for revert: large spike in crash rate on reliability bots] ClientSocketPool treats all pending SocketParams as interchangeable. Therefore they can not contain any connection specific data. This only affects the Http Proxy tunnel case. The lowest risk change to fix this problem is to create the HttpAuthController in the HttpProxyClientSocket. If we get a 407 and need to restart the Tunnel, the pending HttpProxyClientSocket is returned to the HttpNetworkTransaction in the additional error state of the connection and then complete the auth in a pair of states in the HttpNetworkTransaction. This reintroduces a dependency between tunnel setup and the HttpNetworkTransaction, but that will need to be fixed at a later date. BUG=49493,50822 TEST=existing unit tests + manually visiting many SSL sites through a kerberized http proxy. Review URL: http://codereview.chromium.org/3058013 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/3056040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54616 0039d316-1c4b-4281-b951-d872f2087c98
* Fix late binding induced mismatch of Socket and AuthControllervandebo@chromium.org2010-07-301-4/+5
| | | | | | | | | | | ClientSocketPool treats all pending SocketParams as interchangeable. Therefore they can not contain any connection specific data. This only affects the Http Proxy tunnel case. The lowest risk change to fix this problem is to create the HttpAuthController in the HttpProxyClientSocket. If we get a 407 and need to restart the Tunnel, the pending HttpProxyClientSocket is returned to the HttpNetworkTransaction in the additional error state of the connection and then complete the auth in a pair of states in the HttpNetworkTransaction. This reintroduces a dependency between tunnel setup and the HttpNetworkTransaction, but that will need to be fixed at a later date. BUG=49493 TEST=existing unit tests + manually visiting many SSL sites through a kerberized http proxy. Review URL: http://codereview.chromium.org/3058013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54405 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor how ClientSocketPoolBaseHelper avoids re-entrancy.willchan@chromium.org2010-07-151-1/+1
| | | | | | | | | Specifically, we defer asynchronous user callbacks to tasks. BUG=48861 Review URL: http://codereview.chromium.org/2994003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52509 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SSLClientSocketPool.vandebo@chromium.org2010-07-141-1/+4
| | | | | | | | | | | | To support SSLClientSocketPool, ClientSocketPoolBase and ClientSocketHandle require a notion of additional error state reported from the pool. Overtime the error handling may get become more integrated, alleviating the need for some of the additional error state. To support getting Http Proxy credentials from the user, the SSLClientSocketPool will release unauthenticated HttpProxyClientSocket's into the pool as idle. However, it checks their authentication status when receiving one, completing the authentication once the user has provided the credentials. BUG=30357 TEST=existing unit tests, ClientSocketPoolBaseTest.AdditionalErrorState*, SSLClientSocketPoolTest.* Review URL: http://codereview.chromium.org/2870030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52275 0039d316-1c4b-4281-b951-d872f2087c98
* Make the various SocketParams reference counted.vandebo@chromium.org2010-07-121-13/+13
| | | | | | | | | | | This is so that the SSLSocketParam can hold one of any of the existing SocketParams. BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2848029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52107 0039d316-1c4b-4281-b951-d872f2087c98