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

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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/net_watcher/net_watcher.cc ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/end_to_end_test.cc
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 68cb1a392e3f1c74ec7719499450a4a5d317c5cc..55e1bf43711c7b932491b296ddf5ea8c7e968610 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -6,10 +6,10 @@
#include <sys/epoll.h>
#include <list>
+#include <memory>
#include <string>
#include <vector>
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/waitable_event.h"
@@ -507,8 +507,8 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
bool initialized_;
IPEndPoint server_address_;
string server_hostname_;
- scoped_ptr<ServerThread> server_thread_;
- scoped_ptr<QuicTestClient> client_;
+ std::unique_ptr<ServerThread> server_thread_;
+ std::unique_ptr<QuicTestClient> client_;
PacketDroppingTestWriter* client_writer_;
PacketDroppingTestWriter* server_writer_;
bool server_started_;
@@ -588,7 +588,7 @@ TEST_P(EndToEndTest, MultipleRequestResponse) {
TEST_P(EndToEndTest, MultipleClients) {
ASSERT_TRUE(Initialize());
- scoped_ptr<QuicTestClient> client2(CreateQuicClient(nullptr));
+ std::unique_ptr<QuicTestClient> client2(CreateQuicClient(nullptr));
HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo");
request.AddHeader("content-length", "3");
@@ -1738,7 +1738,8 @@ TEST_P(EndToEndTest, ServerSendPublicResetWithDifferentConnectionId) {
header.rejected_packet_number = 10101;
QuicFramer framer(server_supported_versions_, QuicTime::Zero(),
Perspective::IS_SERVER);
- scoped_ptr<QuicEncryptedPacket> packet(framer.BuildPublicResetPacket(header));
+ std::unique_ptr<QuicEncryptedPacket> packet(
+ framer.BuildPublicResetPacket(header));
testing::NiceMock<MockQuicConnectionDebugVisitor> visitor;
client_->client()->session()->connection()->set_debug_visitor(&visitor);
EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id))
@@ -1773,7 +1774,8 @@ TEST_P(EndToEndTest, ClientSendPublicResetWithDifferentConnectionId) {
header.rejected_packet_number = 10101;
QuicFramer framer(server_supported_versions_, QuicTime::Zero(),
Perspective::IS_CLIENT);
- scoped_ptr<QuicEncryptedPacket> packet(framer.BuildPublicResetPacket(header));
+ std::unique_ptr<QuicEncryptedPacket> packet(
+ framer.BuildPublicResetPacket(header));
client_writer_->WritePacket(
packet->data(), packet->length(),
client_->client()->GetLatestClientAddress().address(), server_address_,
@@ -1792,7 +1794,7 @@ TEST_P(EndToEndTest, ServerSendVersionNegotiationWithDifferentConnectionId) {
// Send the version negotiation packet.
QuicConnectionId incorrect_connection_id =
client_->client()->session()->connection()->connection_id() + 1;
- scoped_ptr<QuicEncryptedPacket> packet(
+ std::unique_ptr<QuicEncryptedPacket> packet(
QuicFramer::BuildVersionNegotiationPacket(incorrect_connection_id,
server_supported_versions_));
testing::NiceMock<MockQuicConnectionDebugVisitor> visitor;
@@ -1895,7 +1897,7 @@ TEST_P(EndToEndTest, BadEncryptedData) {
EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
- scoped_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
+ std::unique_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
client_->client()->session()->connection()->connection_id(), false, false,
false, kDefaultPathId, 1, "At least 20 characters.",
PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER));
« no previous file with comments | « net/tools/net_watcher/net_watcher.cc ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698