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

Side by Side Diff: net/quic/p2p/quic_p2p_session_test.cc

Issue 1809863002: Update some callers to use more direct ways of constructing IPAddress from well known literals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rch feedbak Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/quic/p2p/quic_p2p_session.cc ('k') | net/quic/quic_chromium_client_session_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/p2p/quic_p2p_session.h" 5 #include "net/quic/p2p/quic_p2p_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 session2_ = CreateP2PSession(std::move(socket2), crypto_config, 222 session2_ = CreateP2PSession(std::move(socket2), crypto_config,
223 Perspective::IS_CLIENT); 223 Perspective::IS_CLIENT);
224 } 224 }
225 225
226 scoped_ptr<QuicP2PSession> CreateP2PSession(scoped_ptr<Socket> socket, 226 scoped_ptr<QuicP2PSession> CreateP2PSession(scoped_ptr<Socket> socket,
227 QuicP2PCryptoConfig crypto_config, 227 QuicP2PCryptoConfig crypto_config,
228 Perspective perspective) { 228 Perspective perspective) {
229 QuicChromiumPacketWriter* writer = 229 QuicChromiumPacketWriter* writer =
230 new QuicChromiumPacketWriter(socket.get()); 230 new QuicChromiumPacketWriter(socket.get());
231 scoped_ptr<QuicConnection> quic_connection1(new QuicConnection( 231 scoped_ptr<QuicConnection> quic_connection1(new QuicConnection(
232 0, IPEndPoint(IPAddress(0, 0, 0, 0), 0), &quic_helper_, writer, 232 0, IPEndPoint(IPAddress::IPv4AllZeros(), 0), &quic_helper_, writer,
233 true /* owns_writer */, perspective, QuicSupportedVersions())); 233 true /* owns_writer */, perspective, QuicSupportedVersions()));
234 writer->SetConnection(quic_connection1.get()); 234 writer->SetConnection(quic_connection1.get());
235 235
236 scoped_ptr<QuicP2PSession> result( 236 scoped_ptr<QuicP2PSession> result(
237 new QuicP2PSession(config_, crypto_config, std::move(quic_connection1), 237 new QuicP2PSession(config_, crypto_config, std::move(quic_connection1),
238 std::move(socket))); 238 std::move(socket)));
239 result->Initialize(); 239 result->Initialize();
240 return result; 240 return result;
241 } 241 }
242 242
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 EXPECT_TRUE(stream_delegate.is_closed()); 389 EXPECT_TRUE(stream_delegate.is_closed());
390 EXPECT_EQ(QUIC_PACKET_READ_ERROR, stream_delegate.error()); 390 EXPECT_EQ(QUIC_PACKET_READ_ERROR, stream_delegate.error());
391 EXPECT_TRUE(session_delegate.is_closed()); 391 EXPECT_TRUE(session_delegate.is_closed());
392 EXPECT_EQ(QUIC_PACKET_READ_ERROR, session_delegate.error()); 392 EXPECT_EQ(QUIC_PACKET_READ_ERROR, session_delegate.error());
393 393
394 // Verify that the socket was destroyed. 394 // Verify that the socket was destroyed.
395 EXPECT_FALSE(socket1_); 395 EXPECT_FALSE(socket1_);
396 } 396 }
397 397
398 } // namespace net 398 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/p2p/quic_p2p_session.cc ('k') | net/quic/quic_chromium_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698