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

Unified Diff: remoting/host/native_messaging/pipe_messaging_channel.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/native_messaging/pipe_messaging_channel.cc
diff --git a/remoting/host/native_messaging/pipe_messaging_channel.cc b/remoting/host/native_messaging/pipe_messaging_channel.cc
index 399bfa8aa9ae1fe795e70703309d747473ed0c63..becd71014efabca618ff6561deac1b9af1a6167d 100644
--- a/remoting/host/native_messaging/pipe_messaging_channel.cc
+++ b/remoting/host/native_messaging/pipe_messaging_channel.cc
@@ -49,7 +49,7 @@ PipeMessagingChannel::PipeMessagingChannel(
: native_messaging_reader_(DuplicatePlatformFile(input.Pass())),
native_messaging_writer_(new NativeMessagingWriter(
DuplicatePlatformFile(output.Pass()))),
- event_handler_(NULL),
+ event_handler_(nullptr),
weak_factory_(this) {
weak_ptr_ = weak_factory_.GetWeakPtr();
}
@@ -95,12 +95,13 @@ void PipeMessagingChannel::Shutdown() {
DCHECK(CalledOnValidThread());
if (event_handler_) {
- // Set event_handler_ to NULL to indicate the object is in a shutdown cycle.
- // Since event_handler->OnDisconnect() will destroy the current object,
- // |event_handler_| will become a dangling pointer after OnDisconnect()
- // returns. Therefore, we set |event_handler_| to NULL beforehand.
+ // Set |event_handler_| to nullptr to indicate the object is in a shutdown
+ // cycle. Since event_handler->OnDisconnect() will destroy the current
+ // object, |event_handler_| will become a dangling pointer after
+ // OnDisconnect() returns. Therefore, we set |event_handler_| to nullptr
+ // beforehand.
EventHandler* handler = event_handler_;
- event_handler_ = NULL;
+ event_handler_ = nullptr;
handler->OnDisconnect();
}
}
« no previous file with comments | « remoting/host/native_messaging/native_messaging_writer_unittest.cc ('k') | remoting/host/pairing_registry_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698