diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 22:11:47 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 22:11:47 +0000 |
commit | fa87a2527ca8c0bcef92d8e44791332782936911 (patch) | |
tree | 04dc5d1e6881f8356f91203a386648057b20d924 /chrome/common/notification_service.cc | |
parent | 4f64d0af5908e36d356c834005d08cca98d579fe (diff) | |
download | chromium_src-fa87a2527ca8c0bcef92d8e44791332782936911.zip chromium_src-fa87a2527ca8c0bcef92d8e44791332782936911.tar.gz chromium_src-fa87a2527ca8c0bcef92d8e44791332782936911.tar.bz2 |
Revert. Failing unit tests.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/notification_service.cc')
-rw-r--r-- | chrome/common/notification_service.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/common/notification_service.cc b/chrome/common/notification_service.cc index 2345ba0..672052f 100644 --- a/chrome/common/notification_service.cc +++ b/chrome/common/notification_service.cc @@ -29,11 +29,9 @@ #include "chrome/common/notification_service.h" -// TODO(evanm): This shouldn't depend on static initialization. -// static -TLSSlot NotificationService::tls_index_; +int NotificationService::tls_index_ = ThreadLocalStorage::Alloc(); -// static +/* static */ bool NotificationService::HasKey(const NotificationSourceMap& map, const NotificationSource& source) { return map.find(source.map_key()) != map.end(); @@ -45,7 +43,7 @@ NotificationService::NotificationService() { memset(observer_counts_, 0, sizeof(observer_counts_)); #endif - tls_index_.Set(this); + ThreadLocalStorage::Set(tls_index_, this); } void NotificationService::AddObserver(NotificationObserver* observer, @@ -119,7 +117,7 @@ void NotificationService::Notify(NotificationType type, NotificationService::~NotificationService() { - tls_index_.Set(NULL); + ThreadLocalStorage::Set(tls_index_, NULL); #ifndef NDEBUG for (int i = 0; i < NOTIFICATION_TYPE_COUNT; i++) { |