summaryrefslogtreecommitdiffstats
path: root/net/net.gyp
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-19 23:05:07 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-19 23:05:07 +0000
commitca8e0d19712af797462689232c6b4b624fc5de6d (patch)
tree068d955703d91519d223885f044277b0f1c9cdc4 /net/net.gyp
parentabb34747bac795574da01e38dd3fada5471fac39 (diff)
downloadchromium_src-ca8e0d19712af797462689232c6b4b624fc5de6d.zip
chromium_src-ca8e0d19712af797462689232c6b4b624fc5de6d.tar.gz
chromium_src-ca8e0d19712af797462689232c6b4b624fc5de6d.tar.bz2
Add HttpResponseBodyDrainer. Use it for unfinished HttpStreams.
Hopefully this will improve our reuse of sockets, and thus performance, since many redirects have response bodies, so we end up discarding those sockets rather than draining the bodies and reusing the socket. Fix a bunch of tests since we now try to read from the socket in HttpNetworkTransaction's destructor, which often executes after the StaticSocketDataProvider has already been destroyed, so we end up trying to invoke pure virtuals via stale pointers. BUG=54277 TEST= 1) Start up chrome with an empty cache (I just use --user-data-dir=/tmp/newprofile). 2) Open up about:net-internals, browse to its socket tab. 3) In a separate Chrome tab, open up http://google.com (NOT www.google.com). NOTE: This will get a 301 redirect with a response body for us to drain. Previously we wouldn't drain it, so we wouldn't reuse the socket. 4) In the about:net-internals's socket page, wait for it to reload (or force a reload). Look for the google.com row under tcp_socket_pool. If it doesn't exist, then that means it failed. If it does exist _and_ the idle column says '1', then it worked. Review URL: http://codereview.chromium.org/3293015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/net.gyp')
-rw-r--r--net/net.gyp3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/net.gyp b/net/net.gyp
index 10a4d8d..080b5b0 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -429,6 +429,8 @@
'http/http_request_headers.cc',
'http/http_request_headers.h',
'http/http_request_info.h',
+ 'http/http_response_body_drainer.cc',
+ 'http/http_response_body_drainer.h',
'http/http_response_headers.cc',
'http/http_response_headers.h',
'http/http_response_info.cc',
@@ -806,6 +808,7 @@
'http/http_network_transaction_unittest.cc',
'http/http_proxy_client_socket_pool_unittest.cc',
'http/http_request_headers_unittest.cc',
+ 'http/http_response_body_drainer_unittest.cc',
'http/http_response_headers_unittest.cc',
'http/http_transaction_unittest.cc',
'http/http_transaction_unittest.h',