diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 12:33:19 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 12:33:19 +0000 |
commit | 5e43ceb104132688449e3d59c0c92d9660c7bb57 (patch) | |
tree | 1f6f8cde6a1617cdcd9f06e376a786c04e74b9e2 /net | |
parent | 267327ee4a17950e348c1f7ffd5209662e1d9adc (diff) | |
download | chromium_src-5e43ceb104132688449e3d59c0c92d9660c7bb57.zip chromium_src-5e43ceb104132688449e3d59c0c92d9660c7bb57.tar.gz chromium_src-5e43ceb104132688449e3d59c0c92d9660c7bb57.tar.bz2 |
Revert "Apply test isolation goodness to net_unittests."
Revert "Fix a memory leak in DnsReloadTimer"
Valgrind test_shell_tests still fails, will investigate offline. :(
TBR=wtc
BUG=12710
Review URL: http://codereview.chromium.org/434115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/host_resolver_proc.cc | 17 | ||||
-rw-r--r-- | net/base/run_all_unittests.cc | 4 | ||||
-rw-r--r-- | net/ocsp/nss_ocsp.cc | 2 |
3 files changed, 7 insertions, 16 deletions
diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc index c6a011c..cd6fc12 100644 --- a/net/base/host_resolver_proc.cc +++ b/net/base/host_resolver_proc.cc @@ -77,6 +77,12 @@ int HostResolverProc::ResolveUsingPrevious(const std::string& host, // Keep a timer per calling thread to rate limit the calling of res_ninit. class DnsReloadTimer { public: + DnsReloadTimer() { + tls_index_.Initialize(SlotReturnFunction); + } + + ~DnsReloadTimer() { } + // Check if the timer for the calling thread has expired. When no // timer exists for the calling thread, create one. bool Expired() { @@ -106,17 +112,6 @@ class DnsReloadTimer { } private: - friend struct DefaultSingletonTraits<DnsReloadTimer>; - - DnsReloadTimer() { - tls_index_.Initialize(SlotReturnFunction); - } - - ~DnsReloadTimer() { - SlotReturnFunction(tls_index_.Get()); - tls_index_.Free(); - } - // We use thread local storage to identify which base::TimeTicks to // interact with. static ThreadLocalStorage::Slot tls_index_ ; diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc index 178bd5b..2bed0b7 100644 --- a/net/base/run_all_unittests.cc +++ b/net/base/run_all_unittests.cc @@ -30,7 +30,5 @@ #include "net/base/net_test_suite.h" int main(int argc, char** argv) { - NetTestSuite test_suite(argc, argv); - test_suite.EnforceTestIsolation(); - return test_suite.Run(); + return NetTestSuite(argc, argv).Run(); } diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc index 7760e6b..85fc5f5 100644 --- a/net/ocsp/nss_ocsp.cc +++ b/net/ocsp/nss_ocsp.cc @@ -61,8 +61,6 @@ class OCSPInitSingleton : public MessageLoop::DestructionObserver { friend struct DefaultSingletonTraits<OCSPInitSingleton>; OCSPInitSingleton(); virtual ~OCSPInitSingleton() { - if (io_loop_) - io_loop_->RemoveDestructionObserver(this); request_context_ = NULL; } |