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

Unified Diff: mojo/system/raw_channel_win.cc

Issue 597413002: Mojo: NULL -> nullptr in mojo/system and mojo/embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: EXPECT_TRUE Created 6 years, 3 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 | « mojo/system/raw_channel_unittest.cc ('k') | mojo/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel_win.cc
diff --git a/mojo/system/raw_channel_win.cc b/mojo/system/raw_channel_win.cc
index 0132795e135a2fa573883a03a25701b0d19a08f2..99e674f99cfc3cb929ec72a5cfd664de5e9d8741 100644
--- a/mojo/system/raw_channel_win.cc
+++ b/mojo/system/raw_channel_win.cc
@@ -50,8 +50,8 @@ class VistaOrHigherFunctions {
VistaOrHigherFunctions::VistaOrHigherFunctions()
: is_vista_or_higher_(base::win::GetVersion() >= base::win::VERSION_VISTA),
- set_file_completion_notification_modes_(NULL),
- cancel_io_ex_(NULL) {
+ set_file_completion_notification_modes_(nullptr),
+ cancel_io_ex_(nullptr) {
if (!is_vista_or_higher_)
return;
@@ -279,7 +279,7 @@ void RawChannelWin::RawChannelIOHandler::DetachFromOwnerNoLock(
if (pending_write_)
preserved_write_buffer_after_detach_ = write_buffer.Pass();
- owner_ = NULL;
+ owner_ = nullptr;
if (ShouldSelfDestruct())
delete this;
}
@@ -347,7 +347,7 @@ void RawChannelWin::RawChannelIOHandler::OnWriteCompleted(DWORD bytes_written,
RawChannelWin::RawChannelWin(embedder::ScopedPlatformHandle handle)
: handle_(handle.Pass()),
- io_handler_(NULL),
+ io_handler_(nullptr),
skip_completion_port_on_success_(
g_vista_or_higher_functions.Get().is_vista_or_higher()) {
DCHECK(handle_.is_valid());
@@ -367,7 +367,7 @@ RawChannel::IOResult RawChannelWin::Read(size_t* bytes_read) {
DCHECK(io_handler_);
DCHECK(!io_handler_->pending_read());
- char* buffer = NULL;
+ char* buffer = nullptr;
size_t bytes_to_read = 0;
read_buffer()->GetBuffer(&buffer, &bytes_to_read);
@@ -553,14 +553,16 @@ void RawChannelWin::OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
// soon as possible.
// Note: |CancelIo()| only cancels read/write requests started from this
// thread.
- if (g_vista_or_higher_functions.Get().is_vista_or_higher())
- g_vista_or_higher_functions.Get().CancelIoEx(io_handler_->handle(), NULL);
- else
+ if (g_vista_or_higher_functions.Get().is_vista_or_higher()) {
+ g_vista_or_higher_functions.Get().CancelIoEx(io_handler_->handle(),
+ nullptr);
+ } else {
CancelIo(io_handler_->handle());
+ }
}
io_handler_->DetachFromOwnerNoLock(read_buffer.Pass(), write_buffer.Pass());
- io_handler_ = NULL;
+ io_handler_ = nullptr;
}
} // namespace
« no previous file with comments | « mojo/system/raw_channel_unittest.cc ('k') | mojo/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698