Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: chrome/common/notification_service.cc

Issue 5986012: Move thread local stuff from base to base/threading and consistently use the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/tracked_objects.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/threading/thread_local.h"
9 #include "chrome/common/notification_observer.h" 9 #include "chrome/common/notification_observer.h"
10 10
11 static base::LazyInstance<base::ThreadLocalPointer<NotificationService> > 11 static base::LazyInstance<base::ThreadLocalPointer<NotificationService> >
12 lazy_tls_ptr(base::LINKER_INITIALIZED); 12 lazy_tls_ptr(base::LINKER_INITIALIZED);
13 13
14 // static 14 // static
15 NotificationService* NotificationService::current() { 15 NotificationService* NotificationService::current() {
16 return lazy_tls_ptr.Pointer()->Get(); 16 return lazy_tls_ptr.Pointer()->Get();
17 } 17 }
18 18
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 NotificationSourceMap omap = observers_[i]; 142 NotificationSourceMap omap = observers_[i];
143 for (NotificationSourceMap::iterator it = omap.begin(); 143 for (NotificationSourceMap::iterator it = omap.begin();
144 it != omap.end(); ++it) 144 it != omap.end(); ++it)
145 delete it->second; 145 delete it->second;
146 } 146 }
147 } 147 }
148 148
149 NotificationObserver::NotificationObserver() {} 149 NotificationObserver::NotificationObserver() {}
150 150
151 NotificationObserver::~NotificationObserver() {} 151 NotificationObserver::~NotificationObserver() {}
OLDNEW
« no previous file with comments | « base/tracked_objects.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698