summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* Ignore certificate errors when connecting to an HTTPS Proxyrch@chromium.org2010-08-261-0/+4
| | | | | | | | | | | | if LOAD_IGNORE_ALL_CERT_ERRORS is set. This happens when the --ignore_certificate_errors command line flag is present. BUG=none TEST=none Review URL: http://codereview.chromium.org/3124044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57585 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY flow control: add support for receive window sizeagayev@chromium.org2010-08-263-1/+4
| | | | | | | | | BUG=48100 TEST=net_unittests Review URL: http://codereview.chromium.org/3137014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57453 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the reused_socket_ member because we don't really need it.mbelshe@chromium.org2010-08-252-8/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3120032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57418 0039d316-1c4b-4281-b951-d872f2087c98
* Gather preconnection use vs waste statisticsjar@chromium.org2010-08-252-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I now gather statistics only in the transport socket classes TcpClientSocket*. All other socket classes forward significant data (that they are used in a speculation) to their transport class, where this data is stored, and then dumped when the TCP socket is closed. This CL also repaired a slight miscount in bytes read and written on Windows, as error codes were mistakenly accumulated as byte counts. This CL repaired a significant undercounting in linux/mac via StatsCounter (the logging counter appears correct). Libjingle support is minimal (NOTREACHED), but I don't know that there are subresources that will be speculatively preconnected from that class (and it is less obvious how the class uses underlying sockets, if at all). BUG=42694 r=willchan Review URL: http://codereview.chromium.org/3163033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57377 0039d316-1c4b-4281-b951-d872f2087c98
* Attempting to re-land CL 3110006 which turned out to have rch@chromium.org2010-08-259-103/+580
| | | | | | | | | | | | | | | | | | | | | 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
* Move the stream initialization out of the HttpStreamRequest and backmbelshe@chromium.org2010-08-258-50/+83
| | | | | | | | | | | | | | into the HttpNetworkTransaction. The reason is because the stream factory should get the stream connected, but not actually initialize the stream; stream initialization should only happen when the stream uses it. BUG=none TEST=none Review URL: http://codereview.chromium.org/3137034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57342 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 57333 - Add support for speaking SSL to an HTTP Proxy, todhollowa@chromium.org2010-08-259-578/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-259-102/+578
| | | | | | | | | | | | | | | | | | 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
* Refactor: change the spdy session pool key to take a ProxyServer instead of ↵eroman@chromium.org2010-08-252-4/+4
| | | | | | | | | a string representation of the proxy server. BUG=52668 Review URL: http://codereview.chromium.org/3197018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57297 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash where we are checking IsConnected(). If you look into the mbelshe@chromium.org2010-08-253-3/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | implementation of IsConnected() on windows, you'll find that it can synchronously check if the socket is connected. This makes it so that a CHECK (or DCHECK) on this attribute is dependent on the peer. The peer could send us a TCP-FIN at any time - even 1 nanosecond before our call to IsConnected(). We can only use CHECK(!IsConnected()) to check before we connect, we simply can't use it at runtime. I searched the code and found 4 other instances of this broken check. Most were DCHECKs, which is good, but I've removed them just the same. Turns out our MockSockets have a mechanism for simulating this error, but it wasn't tested nor plumbed through the MockSSLClientSocket. In the process I added a couple of basic proxy test cases, which may be slightly redundant with other test cases that are more advanced. But they seem like a good idea to cover anyway. Added 6 tests in total. BUG=53099 TEST=ProxyTunnelGetHangup, RecycleDeadSSLSocket Review URL: http://codereview.chromium.org/3107036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57295 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the key into the spdy session pool identifies the actual proxy ↵eroman@chromium.org2010-08-251-2/+3
| | | | | | | | | | used, and not the full list of possible proxies for the URL. BUG=52668 TEST=SpdyNetworkTransactionTest.DirectConnectProxyReconnect Review URL: http://codereview.chromium.org/3192011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57274 0039d316-1c4b-4281-b951-d872f2087c98
* Remove two CHECKs that were added to help track down the crashwtc@chromium.org2010-08-241-5/+2
| | | | | | | | | | | | | in http://crbug.com/49862. That crash no longer occurs. Fix cpplint.py nit: add a "// namespace" comment. R=vandebo BUG=49862 TEST=none Review URL: http://codereview.chromium.org/3165057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57250 0039d316-1c4b-4281-b951-d872f2087c98
* Fail rather than crash if username+password are unspecified for NTLM on ↵cbentzel@chromium.org2010-08-241-0/+5
| | | | | | | | | | | | | Linux+OSX. This will be yanked out, but is being used to triage a bug. BUG=50517 TEST=None Review URL: http://codereview.chromium.org/3150033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57211 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that the memory used to receive thervargas@google.com2010-08-243-11/+22
| | | | | | | | | | | | | pointer of the backend is valid until the callback fires, even after the http cache is deleted. BUG=52387 TEST=net_unittests Review URL: http://codereview.chromium.org/3195017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57210 0039d316-1c4b-4281-b951-d872f2087c98
* --auth-schemes specifies which authentication schemes are supported on the ↵cbentzel@chromium.org2010-08-232-0/+71
| | | | | | | | | | | | | | | command line. --auth-schemes should be a command separated list containing one or more of the following schemes: basic, digest, ntlm, or negotiate. This will primarily be used to help triage user-reported bugs. BUG=None TEST=specify --auth-schemes and ensure that only the specified schemes are supported. Also, when unspecified all schemes should be supported. Review URL: http://codereview.chromium.org/3199002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57073 0039d316-1c4b-4281-b951-d872f2087c98
* Address post-review comments on r56727.agl@chromium.org2010-08-231-1/+3
| | | | | | | | | BUG=none TEST=none http://codereview.chromium.org/3107030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57059 0039d316-1c4b-4281-b951-d872f2087c98
* Add option to simulate alternate protocol always being present.mbelshe@chromium.org2010-08-224-3/+84
| | | | | | | | | | | | | | | It's a bit hardcoded (port 443, NPN/SPDY2), but it is just for testing purposes. To use this mode, run chrome with: chrome.exe --use-spdy=npn,force-alt-protocols BUG=none TEST=http_alternate_protocols_unittest.cc Review URL: http://codereview.chromium.org/3195015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57022 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obviously unneeded forward declarations from headers under ↵viettrungluu@chromium.org2010-08-219-21/+2
| | | | | | | | | | | 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
* Reintegrate certificate selection in HttpNetworkTransaction DoLoopdavidben@chromium.org2010-08-211-4/+7
| | | | | | | | | | | | | | | | | | | | | The HttpNetworkTransaction refactor intercepts the client auth handling and moves it out of DoLoop. Because HandleCertificateRequest often switches states, this caused a DCHECK and crash in some circumstances. This reintegrates it and adds unit tests to catch the DCHECK. We really want to test sending a legitimate certificate, as well as more checking interesting errors, but we cannot import temporary keys yet. We also add a patch for tlslite to send a non-empty certificate_types. Apple's SSL implementation raises a protocol error otherwise. BUG=52744,51132,52778 TEST=SSLClientSocketTest.ConnectClientAuth*,URLRequestTest.ClientAuthTest Review URL: http://codereview.chromium.org/3141026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56983 0039d316-1c4b-4281-b951-d872f2087c98
* HTTP cache: Move DeleteCacheCompletionCallback to the anonymous namespacervargas@google.com2010-08-211-14/+14
| | | | | | | | | | | | | to see if that makes mac release happy. BUG=none TEST=none TBR=eroman Review URL: http://codereview.chromium.org/3167032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56969 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: It turns out that the cache destructorrvargas@google.com2010-08-212-17/+90
| | | | | | | | | | | | | | | may be called from within one of the notifications of "backend construction done". This CL makes sure that this scenario is handled properly by invoking the callbacks one at a time, posting a task before moving on to the next one. BUG=52090 TEST=netunittests Review URL: http://codereview.chromium.org/3173030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56964 0039d316-1c4b-4281-b951-d872f2087c98
* net: expect MITM attacks with HTTP proxies and command line flag.agl@chromium.org2010-08-191-0/+3
| | | | | | | | | | | | | | | | | With r51258 we started requiring the TLS renegotiation extension from a whitelist of servers that we knew supported it. When Chrome is getting MITM attacked, this extension can be removed and this broke some debugging tools (which intercept SSL connections) and some proxies which do the same. This patch causes us to expect to be MITM attacked when tunneling via an HTTP proxy and when the --allow-ssl-mitm-proxies command line flag is given. BUG=48485 TEST=Can't really test without one of these MITM proxy machines. http://codereview.chromium.org/3111019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56727 0039d316-1c4b-4281-b951-d872f2087c98
* Remove forward declares for ASCIIToUTF16 from string_util. All callers now usebrettw@chromium.org2010-08-191-0/+1
| | | | | | | | | | utf_string_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3148019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56719 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure we flush ssl pool when CloseCurrentConnections is called.lzheng@chromium.org2010-08-191-0/+1
| | | | | | | | | BUG=none TEST=none (this is a method for testing/debugging) Review URL: http://codereview.chromium.org/3171016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56698 0039d316-1c4b-4281-b951-d872f2087c98
* SpdySessionPool closes down sessions accurately now.erikchen@google.com2010-08-191-1/+1
| | | | | | | | | | This may or may not fix 50265. Regardless, the previous behavior was incorrect. TEST=none BUG=none Review URL: http://codereview.chromium.org/3150023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56696 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unnecessary STL #includes from src/net.viettrungluu@chromium.org2010-08-195-8/+1
| | | | | | | | | | | | This removes obviously unneeded inclusions of <map>, <set>, <string>, <vector>, etc. from src/net. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3132022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56654 0039d316-1c4b-4281-b951-d872f2087c98
* A WebKit layout test failed with the HttpNetworkTransaction refactoring.mbelshe@chromium.org2010-08-191-1/+6
| | | | | | | | | | | | | | | The problem is that upload progress continues after the socket has been returned to the pool, but because we had zeroed out the stream, we could no longer report a value. (We'd go from 100% done, to 0 progress because GetUploadProgress() would return 0) BUG=none TEST=none TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/3189011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56650 0039d316-1c4b-4281-b951-d872f2087c98
* Extract connection logic from HttpNetworkTransaction into a newmbelshe@chromium.org2010-08-1919-1101/+2131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HttpStreamFactory. The HttpNetworkTransaction now deals exclusively with streams rather than connections directly. This cut the size of HTN roughly in in half. The HttpNetworkTransaction is still responsible for all proxy and server authentication functions. This is because the streams may come and go - we could create a stream, have the server declare auth is needed, and then the next attempt would be on a different stream. So Auth belongs on the HNT. The HNT no longer has direct access to the connection itself; instead, it only knows of an HttpStream. The StreamRequest, however, is responsible for determining whether the connection needs to use a proxy, whether AlternateProtocols are available, and whether the connection should be SPDY or HTTP. Other changes: - moved some static configuration methods from HNT to HttpStreamFactory. - added some methods to the HttpStream. BUG=none TEST=all Review URL: http://codereview.chromium.org/3171002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56646 0039d316-1c4b-4281-b951-d872f2087c98
* Send user agent with CONNECT requests.vandebo@chromium.org2010-08-187-5/+60
| | | | | | | | | 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 CRLF.cbentzel@chromium.org2010-08-181-1/+1
| | | | | | | | | | | The svn:eol-style properties are correct on this file. When using svn, the CRLF does not show up due to munging. Using git it does show up. BUG=None TEST=None Review URL: http://codereview.chromium.org/3194006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56569 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY flow control: fix for WINDOW_UPDATEs arriving while request is being sent.agayev@chromium.org2010-08-171-1/+1
| | | | | | | | | BUG=48100 TEST=net_unittests Review URL: http://codereview.chromium.org/3048058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56355 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize all data members in HTTPResponseInfo's new ctor and remove the ↵michaeln@chromium.org2010-08-131-0/+2
| | | | | | | | | | | related valgrind suppression. BUG=51940 TEST=n/a Review URL: http://codereview.chromium.org/3163010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56068 0039d316-1c4b-4281-b951-d872f2087c98
* Uninitialized member vars and inlined constructors.finnur@chromium.org2010-08-125-5/+22
| | | | | | | | | | BUG=None TEST=None CID=3810, 8793, 8794 Review URL: http://codereview.chromium.org/3156003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55869 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Start cleaning up net/erg@google.com2010-08-1113-19/+83
| | | | | | | | | | | | url_request.h and http_response_info.h are some of the most included headers from net/ in chrome. Do what forward declaration we can in those headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/3150003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55780 0039d316-1c4b-4281-b951-d872f2087c98
* Add a field trial for the cache WRT prefetchinggavinp@chromium.org2010-08-111-2/+14
| | | | | | | | | | | | | Prefetching might be putting stress on the cache concurrency. This fieldtrial explores if this is the case. R=rvargas BUG=none TEST=none Review URL: http://codereview.chromium.org/3133006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55725 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a bunch of extra includes.vandebo@chromium.org2010-08-112-3/+4
| | | | | | | | | 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
* Removed spdy_network_transaction.h file.erikchen@google.com2010-08-091-1/+0
| | | | | | | | | | Finished migrating last unit tests to use http_network_transaction. BUG=43330 TEST=net_unittests Review URL: http://codereview.chromium.org/3091019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55454 0039d316-1c4b-4281-b951-d872f2087c98
* More metrics for proxy connections impact A/B test.ziadh@chromium.org2010-08-091-0/+1
| | | | | | | | | | | | | I added socket request times (for new/unused sockets). The hypothesis is that if proxy servers get overloaded, we will see an increase in request times for new sockets. Hence, we know that we should tone back a little. BUG=44501 r=jar Review URL: http://codereview.chromium.org/3040049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55377 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 5)thestig@chromium.org2010-08-071-0/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3041049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55349 0039d316-1c4b-4281-b951-d872f2087c98
* Bad interaction between 2 A/B experimentsziadh@chromium.org2010-08-062-1/+9
| | | | | | | | | | | | | | There is a 1/20 chance that the max number of sockets per group be greater than the max number of sockets per proxy server. This would result in hitting a DCHECK in client_socket_pool_base.cc:145. This CL attempts to circumvent that event. r=jar Review URL: http://codereview.chromium.org/3044051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55303 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the following States from HttpProxyClientSocket:rch@chromium.org2010-08-061-2/+0
| | | | | | | | | | | | | - STATE_RESOLVE_CANONICAL_NAME, - STATE_RESOLVE_CANONICAL_NAME_COMPLETE, They appear to be totally unused. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55276 0039d316-1c4b-4281-b951-d872f2087c98
* Change some EXPECT's to ASSERT's in http_auth_handler_factory_unittest.cccbentzel@chromium.org2010-08-061-3/+3
| | | | | | | | | | | I tripped upon this when I temporarily disabled Negotiate authentication to track down an NTLM bug. BUG=None TEST=net_unittests doesn't crash when HttpAuthHandlerNegotiate::Init returns false. Review URL: http://codereview.chromium.org/3085017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55221 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: flow-control fix: resume I/O once a WINDOW_UPDATE frame is received ↵agayev@chromium.org2010-08-051-0/+3
| | | | | | | | | | | for a stalled stream. BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/3018019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55125 0039d316-1c4b-4281-b951-d872f2087c98
* Leftovers from wstring->string16 conversion in authentication code.cbentzel@chromium.org2010-08-051-2/+3
| | | | | | | | | | | I'm really confused how this even compiled in the first case (such as the npos comparison). BUG=50517 TEST=net_unittests, tested on Ubuntu against NTLM server + proxy. Review URL: http://codereview.chromium.org/2808107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55109 0039d316-1c4b-4281-b951-d872f2087c98
* Implement server push protocol 2.erikchen@google.com2010-08-052-0/+33
| | | | | | | | | TEST=net_unittests BUG=34761 Review URL: http://codereview.chromium.org/3020032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55095 0039d316-1c4b-4281-b951-d872f2087c98
* Modify the SPDY v1 hack to only advertise v1 and not v2 over NPN.mbelshe@chromium.org2010-08-051-1/+1
| | | | | | | | | | | | | There is no point in advertising a protocol that won't work. (When in v1 mode, the protocol frames will all say v1, which, to a v2 server will likely be broken BUG=none TEST=none Review URL: http://codereview.chromium.org/3072025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55086 0039d316-1c4b-4281-b951-d872f2087c98
* Minor change to: http://codereview.chromium.org/3064033rch@chromium.org2010-08-052-221/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to fix valgrind detected memeory leak. Instead of storing the spdy session in a smart pointer member field, use a smart pointer local var in the method. We end up checking the pool twice, but c'est la vie. Refactor HttpNetworkTransaction to eliminate the SPDY specific states of the state machine. This required adding two new states: STATE_INIT_STREAM STATE_INTI_STREAM_COMPLETE The http_stream_ and spdy_http_stream_ member fields have been removed, and replaced by a single stream_ member field which is initialized with either an HttpBasicStream, or SpdyHttpStream depending on the underlying connection. In the process, the NetLog no longer receives TYPE_SPDY events, only TYPE_HTTP, so spdy_network_transaction_unittest.cc needed to be modified accordingly. BUG=50267 TEST=none Review URL: http://codereview.chromium.org/3051034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55080 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 54906 - Refactor HttpNetworkTransaction to eliminate the SPDYdhollowa@chromium.org2010-08-042-114/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific states of the state machine. This required adding two new states: STATE_INIT_STREAM STATE_INTI_STREAM_COMPLETE The http_stream_ and spdy_http_stream_ member fields have been removed, and replaced by a single stream_ member field which is initialized with either an HttpBasicStream, or SpdyHttpStream depending on the underlying connection. In the process, the NetLog no longer receives TYPE_SPDY events, only TYPE_HTTP, so spdy_network_transaction_unittest.cc needed to be modified accordingly. This seems to causing Valgrind leaks: http://build.chromium.org/buildbot/memory/builders/Chromium%20Mac%20(valgrind)/builds/6887/steps/memory%20test:%20net/logs/stdio E.g.: Leak_DefinitelyLost 78,766 (888 direct, 77,878 indirect) bytes in 2 blocks are definitely lost in loss record 6,975 of 7,027 operator new(unsigned long) (mp/vg-bins/scripts/valgrind-memcheck/coregrind/m_replacemalloc/vg_replace_malloc.c:276) net::SpdySessionPool::GetSpdySessionFromSocket(std::pair<net::HostPortPair, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, net::HttpNetworkSession*, net::ClientSocketHandle*, net::BoundNetLog const&, int, scoped_refptr<net::SpdySession>*, bool) net::HttpNetworkTransaction::DoInitStream() net::HttpNetworkTransaction::DoLoop(int) net::HttpNetworkTransaction::OnIOComplete(int) net::ClientSocketHandle::OnIOComplete(int) net::internal::ClientSocketPoolBaseHelper::InvokeUserCallback(net::ClientSocketHandle*) RunnableMethod<net::internal::ClientSocketPoolBaseHelper, void (net::internal::ClientSocketPoolBaseHelper::*)(net::ClientSocketHandle*), Tuple1<net::ClientSocketHandle*> >::Run() MessageLoop::RunTask(Task*) MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) MessageLoop::DoWork() base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) MessageLoop::RunInternal() MessageLoop::Run() TestCompletionCallback::WaitForResult() net::SpdyNetworkTransactionTest_SocketWriteReturnsZero_Test::TestBody() testing::Test::Run() testing::internal::TestInfoImpl::Run() testing::TestCase::Run() testing::internal::UnitTestImpl::RunAllTests() TestSuite::Run() main Suppression (error hash=#-444E9002#): { <insert_a_suppression_name_here> Memcheck:Leak fun:_Znw* fun:_ZN3net15SpdySessionPool24GetSpdySessionFromSocketERKSt4pairINS_12HostPortPairESsEPNS_18HttpNetworkSessionEPNS_18ClientSocketHandleERKNS_11BoundNetLogEiP13scoped_refptrINS_11SpdySessionEEb fun:_ZN3net22HttpNetworkTransaction12DoInitStreamEv fun:_ZN3net22HttpNetworkTransaction6DoLoopEi fun:_ZN3net22HttpNetworkTransaction12OnIOCompleteEi fun:_ZN3net18ClientSocketHandle12OnIOCompleteEi fun:_ZN3net8internal26ClientSocketPoolBaseHelper18InvokeUserCallbackEPNS_18ClientSocketHandleE fun:_ZN14RunnableMethodIN3net8internal26ClientSocketPoolBaseHelperEMS2_FvPNS0_18ClientSocketHandleEE6Tuple1IS4_EE3RunEv fun:_ZN11MessageLoop7RunTaskEP4Task fun:_ZN11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE fun:_ZN11MessageLoop6DoWorkEv fun:_ZN4base19MessagePumpLibevent3RunEPNS_11MessagePump8DelegateE fun:_ZN11MessageLoop11RunInternalEv } BUG=50267 TEST=none Review URL: http://codereview.chromium.org/3064033 TBR=rch@chromium.org Review URL: http://codereview.chromium.org/3038048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54963 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpNetworkTransaction to eliminate the SPDYrch@chromium.org2010-08-042-221/+114
| | | | | | | | | | | | | | | | | | | | | | | | | specific states of the state machine. This required adding two new states: STATE_INIT_STREAM STATE_INTI_STREAM_COMPLETE The http_stream_ and spdy_http_stream_ member fields have been removed, and replaced by a single stream_ member field which is initialized with either an HttpBasicStream, or SpdyHttpStream depending on the underlying connection. In the process, the NetLog no longer receives TYPE_SPDY events, only TYPE_HTTP, so spdy_network_transaction_unittest.cc needed to be modified accordingly. BUG=50267 TEST=none Review URL: http://codereview.chromium.org/3064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54906 0039d316-1c4b-4281-b951-d872f2087c98
* Cleaning up flakiness of a URLSecurityManager unit test.ahendrickson@chromium.org2010-08-041-23/+0
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/2003012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54903 0039d316-1c4b-4281-b951-d872f2087c98