summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-30 16:52:09 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-30 16:52:09 +0000
commit444b8a3c2cb9f74a280eb370abd8792d51870dcb (patch)
tree37be62fef7f7a45a1e93dee5e898e5d25aa40962 /net/base
parent0d4cd065a9b3e28de6ae1e332e1b5fe1d38d6cb6 (diff)
downloadchromium_src-444b8a3c2cb9f74a280eb370abd8792d51870dcb.zip
chromium_src-444b8a3c2cb9f74a280eb370abd8792d51870dcb.tar.gz
chromium_src-444b8a3c2cb9f74a280eb370abd8792d51870dcb.tar.bz2
Make it possible to use ThreadLocalStorage::Slot as a static without
introducing static initializers. Member variables can stay TLS::Slots and their behavior doesn't change. Static instances use TLS::StaticSlot instead. Kind of like http://codereview.chromium.org/8491043 but for TLS. BUG=none TEST=none TBR=agl Review URL: https://chromiumcodereview.appspot.com/9297010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/dns_reloader.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/base/dns_reloader.cc b/net/base/dns_reloader.cc
index ff79388..2254f9a 100644
--- a/net/base/dns_reloader.cc
+++ b/net/base/dns_reloader.cc
@@ -93,15 +93,14 @@ class DnsReloader : public net::NetworkChangeNotifier::DNSObserver {
friend struct base::DefaultLazyInstanceTraits<DnsReloader>;
// We use thread local storage to identify which ReloadState to interact with.
- static base::ThreadLocalStorage::Slot tls_index_ ;
+ static base::ThreadLocalStorage::StaticSlot tls_index_;
DISALLOW_COPY_AND_ASSIGN(DnsReloader);
};
// A TLS slot to the ReloadState for the current thread.
// static
-base::ThreadLocalStorage::Slot DnsReloader::tls_index_(
- base::LINKER_INITIALIZED);
+base::ThreadLocalStorage::StaticSlot DnsReloader::tls_index_ = TLS_INITIALIZER;
base::LazyInstance<DnsReloader>::Leaky
g_dns_reloader = LAZY_INSTANCE_INITIALIZER;