summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 14:53:03 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 14:53:03 +0000
commit12dccc37aeb0c366a12823b611425a40ebfe4f68 (patch)
treee8c3f4d87083f12f19df32b1916c3ec5f5067f93 /chrome/browser
parentf7b773c12de31d15b28625d7591c032a785078a7 (diff)
downloadchromium_src-12dccc37aeb0c366a12823b611425a40ebfe4f68.zip
chromium_src-12dccc37aeb0c366a12823b611425a40ebfe4f68.tar.gz
chromium_src-12dccc37aeb0c366a12823b611425a40ebfe4f68.tar.bz2
Add LeakTracker<URLRequestContext> to IOThread::CleanUp().
Move LeakTracker<URLRequest> up to CleanUp also. No URLRequest should be getting killed in DestructionObservers anymore. BUG=59630 TEST=existing Review URL: http://codereview.chromium.org/4064004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/io_thread.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 8772ffd..5a7fb24 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -35,6 +35,7 @@
#include "net/ocsp/nss_ocsp.h"
#endif // defined(USE_NSS)
#include "net/proxy/proxy_script_fetcher_impl.h"
+#include "net/url_request/url_request_context.h"
namespace {
@@ -356,6 +357,10 @@ void IOThread::CleanUp() {
globals_ = NULL;
BrowserProcessSubThread::CleanUp();
+
+ // URLRequest instances must NOT outlive the IO thread.
+ base::LeakTracker<URLRequest>::CheckForLeaks();
+ base::LeakTracker<URLRequestContext>::CheckForLeaks();
}
void IOThread::CleanUpAfterMessageLoopDestruction() {
@@ -368,13 +373,6 @@ void IOThread::CleanUpAfterMessageLoopDestruction() {
// This will delete the |notification_service_|. Make sure it's done after
// anything else can reference it.
BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction();
-
- // URLRequest instances must NOT outlive the IO thread.
- //
- // To allow for URLRequests to be deleted from
- // MessageLoop::DestructionObserver this check has to happen after CleanUp
- // (which runs before DestructionObservers).
- base::LeakTracker<URLRequest>::CheckForLeaks();
}
net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(