| Index: net/base/dns_reload_timer.cc
|
| ===================================================================
|
| --- net/base/dns_reload_timer.cc (revision 66790)
|
| +++ net/base/dns_reload_timer.cc (working copy)
|
| @@ -5,11 +5,11 @@
|
| #include "net/base/dns_reload_timer.h"
|
|
|
| #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
|
| -#include "base/lazy_instance.h"
|
| +#include "base/singleton.h"
|
| #include "base/thread_local_storage.h"
|
| #include "base/time.h"
|
|
|
| -namespace {
|
| +namespace net {
|
|
|
| // On Linux/BSD, changes to /etc/resolv.conf can go unnoticed thus resulting
|
| // in DNS queries failing either because nameservers are unknown on startup
|
| @@ -58,7 +58,7 @@
|
| }
|
|
|
| private:
|
| - friend struct base::DefaultLazyInstanceTraits<DnsReloadTimer>;
|
| + friend struct DefaultSingletonTraits<DnsReloadTimer>;
|
|
|
| DnsReloadTimer() {
|
| // During testing the DnsReloadTimer Singleton may be created and destroyed
|
| @@ -81,16 +81,8 @@
|
| // static
|
| ThreadLocalStorage::Slot DnsReloadTimer::tls_index_(base::LINKER_INITIALIZED);
|
|
|
| -base::LazyInstance<DnsReloadTimer,
|
| - base::LeakyLazyInstanceTraits<DnsReloadTimer> >
|
| - g_dns_reload_timer(base::LINKER_INITIALIZED);
|
| -
|
| -} // namespace
|
| -
|
| -namespace net {
|
| -
|
| bool DnsReloadTimerHasExpired() {
|
| - DnsReloadTimer* dns_timer = g_dns_reload_timer.Pointer();
|
| + DnsReloadTimer* dns_timer = Singleton<DnsReloadTimer>::get();
|
| return dns_timer->Expired();
|
| }
|
|
|
|
|