Index: extensions/browser/event_router.cc |
diff --git a/extensions/browser/event_router.cc b/extensions/browser/event_router.cc |
index d006d1e9a7588f049faf243e26c7097c71f47b25..b1393fb0838f6055e5e6b43ba7b363e00ccb7397 100644 |
--- a/extensions/browser/event_router.cc |
+++ b/extensions/browser/event_router.cc |
@@ -255,7 +255,7 @@ void EventRouter::OnListenerRemoved(const EventListener* listener) { |
void EventRouter::AddLazyEventListener(const std::string& event_name, |
const std::string& extension_id) { |
bool is_new = listeners_.AddListener(EventListener::ForExtension( |
- event_name, extension_id, NULL, scoped_ptr<DictionaryValue>())); |
+ event_name, extension_id, nullptr, scoped_ptr<DictionaryValue>())); |
if (is_new) { |
std::set<std::string> events = GetRegisteredEvents(extension_id); |
@@ -268,7 +268,7 @@ void EventRouter::AddLazyEventListener(const std::string& event_name, |
void EventRouter::RemoveLazyEventListener(const std::string& event_name, |
const std::string& extension_id) { |
scoped_ptr<EventListener> listener = EventListener::ForExtension( |
- event_name, extension_id, NULL, scoped_ptr<DictionaryValue>()); |
+ event_name, extension_id, nullptr, scoped_ptr<DictionaryValue>()); |
bool did_exist = listeners_.RemoveListener(listener.get()); |
if (did_exist) { |
@@ -294,7 +294,7 @@ void EventRouter::AddFilteredEventListener(const std::string& event_name, |
bool added = listeners_.AddListener(EventListener::ForExtension( |
event_name, |
extension_id, |
- NULL, |
+ nullptr, |
scoped_ptr<DictionaryValue>(filter.DeepCopy()))); |
if (added) |
@@ -356,7 +356,7 @@ bool EventRouter::HasEventListenerImpl(const ListenerMap& listener_map, |
std::set<std::string> EventRouter::GetRegisteredEvents( |
const std::string& extension_id) { |
std::set<std::string> events; |
- const ListValue* events_value = NULL; |
+ const ListValue* events_value = nullptr; |
if (!extension_prefs_ || |
!extension_prefs_->ReadPrefAsList( |
@@ -392,7 +392,7 @@ void EventRouter::AddFilterToEvent(const std::string& event_name, |
if (!filtered_events) |
filtered_events = update.Create(); |
- ListValue* filter_list = NULL; |
+ ListValue* filter_list = nullptr; |
if (!filtered_events->GetList(event_name, &filter_list)) { |
filter_list = new ListValue; |
filtered_events->SetWithoutPathExpansion(event_name, filter_list); |
@@ -407,17 +407,17 @@ void EventRouter::RemoveFilterFromEvent(const std::string& event_name, |
ExtensionPrefs::ScopedDictionaryUpdate update( |
extension_prefs_, extension_id, kFilteredEvents); |
DictionaryValue* filtered_events = update.Get(); |
- ListValue* filter_list = NULL; |
+ ListValue* filter_list = nullptr; |
if (!filtered_events || |
!filtered_events->GetListWithoutPathExpansion(event_name, &filter_list)) { |
return; |
} |
for (size_t i = 0; i < filter_list->GetSize(); i++) { |
- DictionaryValue* filter = NULL; |
+ DictionaryValue* filter = nullptr; |
CHECK(filter_list->GetDictionary(i, &filter)); |
if (filter->Equals(filter)) { |
- filter_list->Remove(i, NULL); |
+ filter_list->Remove(i, nullptr); |
break; |
} |
} |
@@ -425,7 +425,7 @@ void EventRouter::RemoveFilterFromEvent(const std::string& event_name, |
const DictionaryValue* EventRouter::GetFilteredEvents( |
const std::string& extension_id) { |
- const DictionaryValue* events = NULL; |
+ const DictionaryValue* events = nullptr; |
extension_prefs_->ReadPrefAsDictionary( |
extension_id, kFilteredEvents, &events); |
return events; |
@@ -766,7 +766,7 @@ Event::Event(const std::string& event_name, |
scoped_ptr<base::ListValue> event_args) |
: event_name(event_name), |
event_args(event_args.Pass()), |
- restrict_to_browser_context(NULL), |
+ restrict_to_browser_context(nullptr), |
user_gesture(EventRouter::USER_GESTURE_UNKNOWN) { |
DCHECK(this->event_args.get()); |
} |