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

Unified Diff: remoting/protocol/buffered_socket_writer.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
« no previous file with comments | « remoting/protocol/buffered_socket_writer.h ('k') | remoting/protocol/channel_dispatcher_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/buffered_socket_writer.cc
diff --git a/remoting/protocol/buffered_socket_writer.cc b/remoting/protocol/buffered_socket_writer.cc
index 8ebe593143cd75195a5e0122c98911ed6c5e328e..28845f9cd527296d5d41642a99f291f52e838b6e 100644
--- a/remoting/protocol/buffered_socket_writer.cc
+++ b/remoting/protocol/buffered_socket_writer.cc
@@ -27,10 +27,10 @@ struct BufferedSocketWriterBase::PendingPacket {
BufferedSocketWriterBase::BufferedSocketWriterBase()
: buffer_size_(0),
- socket_(NULL),
+ socket_(nullptr),
write_pending_(false),
closed_(false),
- destroyed_flag_(NULL) {
+ destroyed_flag_(nullptr) {
}
void BufferedSocketWriterBase::Init(net::Socket* socket,
@@ -115,7 +115,7 @@ void BufferedSocketWriterBase::HandleWriteResult(int result,
// Stop doing anything if we've been destroyed by the callback.
return;
}
- destroyed_flag_ = NULL;
+ destroyed_flag_ = nullptr;
}
*write_again = true;
@@ -177,7 +177,7 @@ void BufferedSocketWriter::GetNextPacket(
net::IOBuffer** buffer, int* size) {
if (!current_buf_.get()) {
if (queue_.empty()) {
- *buffer = NULL;
+ *buffer = nullptr;
return; // Nothing to write.
}
current_buf_ = new net::DrainableIOBuffer(queue_.front()->data.get(),
@@ -193,14 +193,14 @@ base::Closure BufferedSocketWriter::AdvanceBufferPosition(int written) {
current_buf_->DidConsume(written);
if (current_buf_->BytesRemaining() == 0) {
- current_buf_ = NULL;
+ current_buf_ = nullptr;
return PopQueue();
}
return base::Closure();
}
void BufferedSocketWriter::OnError(int result) {
- current_buf_ = NULL;
+ current_buf_ = nullptr;
}
BufferedSocketWriter::~BufferedSocketWriter() {
@@ -212,7 +212,7 @@ BufferedDatagramWriter::BufferedDatagramWriter() {
void BufferedDatagramWriter::GetNextPacket(
net::IOBuffer** buffer, int* size) {
if (queue_.empty()) {
- *buffer = NULL;
+ *buffer = nullptr;
return; // Nothing to write.
}
*buffer = queue_.front()->data.get();
« no previous file with comments | « remoting/protocol/buffered_socket_writer.h ('k') | remoting/protocol/channel_dispatcher_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698