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

Unified Diff: base/observer_list_threadsafe.h

Issue 1101103002: Clean up ObserverList Pointers to use nullptr instad of NULL or 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Quick Update Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/observer_list.h ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list_threadsafe.h
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h
index 46ce88066931150c0bce56de59c5b9d7f373f9c6..5205a5a9d1f47f4f696592195269c290cf874e1f 100644
--- a/base/observer_list_threadsafe.h
+++ b/base/observer_list_threadsafe.h
@@ -111,7 +111,7 @@ class ObserverListThreadSafe
if (!base::MessageLoop::current())
return;
- ObserverList<ObserverType>* list = NULL;
+ ObserverList<ObserverType>* list = nullptr;
base::PlatformThreadId thread_id = base::PlatformThread::CurrentId();
{
base::AutoLock lock(list_lock_);
@@ -128,8 +128,8 @@ class ObserverListThreadSafe
// If the observer to be removed is in the list, RemoveObserver MUST
// be called from the same thread which called AddObserver.
void RemoveObserver(ObserverType* obs) {
- ObserverListContext* context = NULL;
- ObserverList<ObserverType>* list = NULL;
+ ObserverListContext* context = nullptr;
+ ObserverList<ObserverType>* list = nullptr;
base::PlatformThreadId thread_id = base::PlatformThread::CurrentId();
{
base::AutoLock lock(list_lock_);
@@ -230,7 +230,7 @@ class ObserverListThreadSafe
{
typename ObserverList<ObserverType>::Iterator it(&context->list);
ObserverType* obs;
- while ((obs = it.GetNext()) != NULL)
+ while ((obs = it.GetNext()) != nullptr)
method.Run(obs);
}
« no previous file with comments | « base/observer_list.h ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698