summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 01:01:19 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 01:01:19 +0000
commit7613faaea65b29a00c8bba44b440227fe7b0cade (patch)
treed699a5d92652a10f816960e8bde3c7e3ead6d59f /chrome/browser/io_thread.cc
parent1bd51ce010efeb0123072ad38a2f27cb8505725d (diff)
downloadchromium_src-7613faaea65b29a00c8bba44b440227fe7b0cade.zip
chromium_src-7613faaea65b29a00c8bba44b440227fe7b0cade.tar.gz
chromium_src-7613faaea65b29a00c8bba44b440227fe7b0cade.tar.bz2
Fix HttpPipeliningCompatibilityClient ownership.
Previously it was unowned. Now IOThread::Globals owns it. Due to this, move the CHECK for no leaking URLRequests to the IOThread::Globals destructor. Also, fix up some lifetime ordering issues with HttpPipeliningCompatibilityClient. This lets us delete the HttpPipeliningCompatibilityClient synchronously from within the finishing callback. BUG=123830 TEST=none Review URL: http://codereview.chromium.org/10041008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 1e97879..15361ea 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/net/connect_interceptor.h"
+#include "chrome/browser/net/http_pipelining_compatibility_client.h"
#include "chrome/browser/net/pref_proxy_config_tracker.h"
#include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
@@ -286,7 +287,9 @@ SystemURLRequestContextGetter::GetIOMessageLoopProxy() const {
IOThread::Globals::Globals() {}
-IOThread::Globals::~Globals() {}
+IOThread::Globals::~Globals() {
+ system_request_context->AssertNoURLRequests();
+}
// |local_state| is passed in explicitly in order to (1) reduce implicit
// dependencies and (2) make IOThread more flexible for testing.
@@ -465,8 +468,6 @@ void IOThread::CleanUp() {
net::ShutdownNSSHttpIO();
#endif // defined(USE_NSS)
- globals_->system_request_context->AssertNoURLRequests();
-
system_url_request_context_getter_ = NULL;
// Release objects that the net::URLRequestContext could have been pointing