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

Unified Diff: net/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/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 8926727ca872f3cfda2f67e74898876981a1d2ad..0cf13e1223534c435fbfc799b16f5be72072f89a 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -327,8 +327,7 @@ MockSession::~MockSession() {
}
TestSession::TestSession(QuicConnection* connection, const QuicConfig& config)
- : QuicSession(connection, config),
- crypto_stream_(NULL) {
+ : QuicSession(connection, config), crypto_stream_(nullptr) {
InitializeSession();
}
@@ -345,7 +344,7 @@ QuicCryptoStream* TestSession::GetCryptoStream() {
TestClientSession::TestClientSession(QuicConnection* connection,
const QuicConfig& config)
: QuicClientSessionBase(connection, config),
- crypto_stream_(NULL) {
+ crypto_stream_(nullptr) {
EXPECT_CALL(*this, OnProofValid(_)).Times(AnyNumber());
InitializeSession();
}
@@ -482,11 +481,11 @@ QuicEncryptedPacket* ConstructEncryptedPacket(
QuicFramer framer(QuicSupportedVersions(), QuicTime::Zero(), false);
scoped_ptr<QuicPacket> packet(
BuildUnsizedDataPacket(&framer, header, frames).packet);
- EXPECT_TRUE(packet != NULL);
+ EXPECT_TRUE(packet != nullptr);
QuicEncryptedPacket* encrypted = framer.EncryptPacket(ENCRYPTION_NONE,
sequence_number,
*packet);
- EXPECT_TRUE(encrypted != NULL);
+ EXPECT_TRUE(encrypted != nullptr);
return encrypted;
}
@@ -626,7 +625,7 @@ QuicVersionVector SupportedVersions(QuicVersion version) {
return versions;
}
-TestWriterFactory::TestWriterFactory() : current_writer_(NULL) {}
+TestWriterFactory::TestWriterFactory() : current_writer_(nullptr) {}
TestWriterFactory::~TestWriterFactory() {}
QuicPacketWriter* TestWriterFactory::Create(QuicServerPacketWriter* writer,
@@ -635,15 +634,15 @@ QuicPacketWriter* TestWriterFactory::Create(QuicServerPacketWriter* 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;
}
}
@@ -664,9 +663,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/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698