OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/notification_service.h" | 5 #include "chrome/common/notification_service.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/thread_local.h" | 8 #include "base/thread_local.h" |
| 9 #include "chrome/common/notification_observer.h" |
9 | 10 |
10 static base::LazyInstance<base::ThreadLocalPointer<NotificationService> > | 11 static base::LazyInstance<base::ThreadLocalPointer<NotificationService> > |
11 lazy_tls_ptr(base::LINKER_INITIALIZED); | 12 lazy_tls_ptr(base::LINKER_INITIALIZED); |
12 | 13 |
13 // static | 14 // static |
14 NotificationService* NotificationService::current() { | 15 NotificationService* NotificationService::current() { |
15 return lazy_tls_ptr.Pointer()->Get(); | 16 return lazy_tls_ptr.Pointer()->Get(); |
16 } | 17 } |
17 | 18 |
18 // static | 19 // static |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 for (NotificationSourceMap::iterator it = omap.begin(); | 144 for (NotificationSourceMap::iterator it = omap.begin(); |
144 it != omap.end(); ++it) { | 145 it != omap.end(); ++it) { |
145 delete it->second; | 146 delete it->second; |
146 } | 147 } |
147 } | 148 } |
148 } | 149 } |
149 | 150 |
150 NotificationObserver::NotificationObserver() {} | 151 NotificationObserver::NotificationObserver() {} |
151 | 152 |
152 NotificationObserver::~NotificationObserver() {} | 153 NotificationObserver::~NotificationObserver() {} |
OLD | NEW |