Chromium Code Reviews| Index: net/base/host_resolver_proc.cc |
| diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc |
| index cd6fc12fe30bccdedc0289208c387942e513e98e..473a70c32c48ffad2ab3267e23733c1ffd9dbc05 100644 |
| --- a/net/base/host_resolver_proc.cc |
| +++ b/net/base/host_resolver_proc.cc |
| @@ -77,12 +77,6 @@ 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() { |
| @@ -112,6 +106,16 @@ class DnsReloadTimer { |
| } |
| private: |
| + friend struct DefaultSingletonTraits<DnsReloadTimer>; |
|
wtc
2009/11/25 18:17:01
Do singleton classes need to have their constructo
|
| + |
| + DnsReloadTimer() { |
| + tls_index_.Initialize(SlotReturnFunction); |
| + } |
| + |
| + ~DnsReloadTimer() { |
| + tls_index_.Free(); |
| + } |
| + |
| // We use thread local storage to identify which base::TimeTicks to |
| // interact with. |
| static ThreadLocalStorage::Slot tls_index_ ; |