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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 scoped_ptr<QuicP2PSession> CreateP2PSession(scoped_ptr<Socket> socket, 238 scoped_ptr<QuicP2PSession> CreateP2PSession(scoped_ptr<Socket> socket,
239 QuicP2PCryptoConfig crypto_config, 239 QuicP2PCryptoConfig crypto_config,
240 Perspective perspective) { 240 Perspective perspective) {
241 DefaultPacketWriterFactory writer_factory(socket.get()); 241 DefaultPacketWriterFactory writer_factory(socket.get());
242 net::IPAddressNumber ip(net::kIPv4AddressSize, 0); 242 net::IPAddressNumber ip(net::kIPv4AddressSize, 0);
243 scoped_ptr<QuicConnection> quic_connection1( 243 scoped_ptr<QuicConnection> quic_connection1(
244 new QuicConnection(0, net::IPEndPoint(ip, 0), &quic_helper_, 244 new QuicConnection(0, net::IPEndPoint(ip, 0), &quic_helper_,
245 writer_factory, true /* owns_writer */, perspective, 245 writer_factory, true /* owns_writer */, perspective,
246 true /* is_secuire */, QuicSupportedVersions())); 246 QuicSupportedVersions()));
247 247
248 scoped_ptr<QuicP2PSession> result(new QuicP2PSession( 248 scoped_ptr<QuicP2PSession> result(new QuicP2PSession(
249 config_, crypto_config, quic_connection1.Pass(), socket.Pass())); 249 config_, crypto_config, quic_connection1.Pass(), socket.Pass()));
250 result->Initialize(); 250 result->Initialize();
251 return result.Pass(); 251 return result.Pass();
252 } 252 }
253 253
254 void TestStreamConnection(QuicP2PSession* from_session, 254 void TestStreamConnection(QuicP2PSession* from_session,
255 QuicP2PSession* to_session, 255 QuicP2PSession* to_session,
256 QuicStreamId expected_stream_id); 256 QuicStreamId expected_stream_id);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 EXPECT_TRUE(stream_delegate.is_closed()); 383 EXPECT_TRUE(stream_delegate.is_closed());
384 EXPECT_EQ(QUIC_PACKET_READ_ERROR, stream_delegate.error()); 384 EXPECT_EQ(QUIC_PACKET_READ_ERROR, stream_delegate.error());
385 EXPECT_TRUE(session_delegate.is_closed()); 385 EXPECT_TRUE(session_delegate.is_closed());
386 EXPECT_EQ(QUIC_PACKET_READ_ERROR, session_delegate.error()); 386 EXPECT_EQ(QUIC_PACKET_READ_ERROR, session_delegate.error());
387 387
388 // Verify that the socket was destroyed. 388 // Verify that the socket was destroyed.
389 EXPECT_FALSE(socket1_); 389 EXPECT_FALSE(socket1_);
390 } 390 }
391 391
392 } // namespace net 392 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698