| 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,
|
|
|