Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: net/base/host_resolver_proc.cc

Issue 434115: Revert "Apply test isolation goodness to net_unittests." (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_proc.cc
diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc
index c6a011c4d381676fc1b3ff7d3cbaec78dbbd56c3..cd6fc12fe30bccdedc0289208c387942e513e98e 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_ ;
« no previous file with comments | « no previous file | net/base/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698