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

Unified Diff: net/tools/quic/test_tools/quic_test_utils.cc

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « net/tools/quic/test_tools/quic_test_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_utils.cc
diff --git a/net/tools/quic/test_tools/quic_test_utils.cc b/net/tools/quic/test_tools/quic_test_utils.cc
index 8df57e2431cb3005dae335dd6b04d4fce9e62baf..8fdbe001c68cc0187e46494cb0d6f9e7b003063a 100644
--- a/net/tools/quic/test_tools/quic_test_utils.cc
+++ b/net/tools/quic/test_tools/quic_test_utils.cc
@@ -97,7 +97,7 @@ QuicAckFrame MakeAckFrameWithNackRanges(
TestSession::TestSession(QuicConnection* connection,
const QuicConfig& config)
: QuicSession(connection, config),
- crypto_stream_(NULL) {
+ crypto_stream_(nullptr) {
InitializeSession();
}
@@ -129,7 +129,7 @@ MockAckNotifierDelegate::MockAckNotifierDelegate() {
MockAckNotifierDelegate::~MockAckNotifierDelegate() {
}
-TestWriterFactory::TestWriterFactory() : current_writer_(NULL) {}
+TestWriterFactory::TestWriterFactory() : current_writer_(nullptr) {}
TestWriterFactory::~TestWriterFactory() {}
QuicPacketWriter* TestWriterFactory::Create(QuicPacketWriter* writer,
@@ -138,15 +138,15 @@ QuicPacketWriter* TestWriterFactory::Create(QuicPacketWriter* writer,
}
void TestWriterFactory::OnPacketSent(WriteResult result) {
- if (current_writer_ != NULL && result.status == WRITE_STATUS_ERROR) {
+ if (current_writer_ != nullptr && result.status == WRITE_STATUS_ERROR) {
current_writer_->connection()->OnWriteError(result.error_code);
- current_writer_ = NULL;
+ current_writer_ = nullptr;
}
}
void TestWriterFactory::Unregister(PerConnectionPacketWriter* writer) {
if (current_writer_ == writer) {
- current_writer_ = NULL;
+ current_writer_ = nullptr;
}
}
@@ -167,9 +167,10 @@ WriteResult TestWriterFactory::PerConnectionPacketWriter::WritePacket(
size_t buf_len,
const IPAddressNumber& self_address,
const IPEndPoint& peer_address) {
- // A DCHECK(factory_current_writer_ == NULL) would be wrong here -- this class
- // may be used in a setting where connection()->OnPacketSent() is called in a
- // different way, so TestWriterFactory::OnPacketSent might never be called.
+ // A DCHECK(factory_current_writer_ == nullptr) would be wrong here -- this
+ // class may be used in a setting where connection()->OnPacketSent() is called
+ // in a different way, so TestWriterFactory::OnPacketSent might never be
+ // called.
factory_->current_writer_ = this;
return QuicPerConnectionPacketWriter::WritePacket(buffer,
buf_len,
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698