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

Side by Side Diff: net/quic/quic_client_session_test.cc

Issue 1025573002: QUIC - disable QUIC if packet loss rate is bad for a connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for Patch Set 7 Created 5 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/quic_client_session.cc ('k') | net/quic/quic_connection_logger.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/quic_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 base::MessageLoop::current()->message_loop_proxy().get(), 54 base::MessageLoop::current()->message_loop_proxy().get(),
55 &net_log_) { 55 &net_log_) {
56 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, 56 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort,
57 /*is_secure=*/false, 57 /*is_secure=*/false,
58 PRIVACY_MODE_DISABLED), 58 PRIVACY_MODE_DISABLED),
59 &crypto_config_, nullptr); 59 &crypto_config_, nullptr);
60 // Advance the time, because timers do not like uninitialized times. 60 // Advance the time, because timers do not like uninitialized times.
61 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); 61 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
62 } 62 }
63 63
64 void TearDown() override { session_.CloseSessionOnError(ERR_ABORTED); } 64 void TearDown() override {
65 session_.CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR);
66 }
65 67
66 scoped_ptr<DatagramClientSocket> GetSocket() { 68 scoped_ptr<DatagramClientSocket> GetSocket() {
67 socket_factory_.AddSocketDataProvider(&socket_data_); 69 socket_factory_.AddSocketDataProvider(&socket_data_);
68 return socket_factory_.CreateDatagramClientSocket( 70 return socket_factory_.CreateDatagramClientSocket(
69 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt), 71 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt),
70 &net_log_, NetLog::Source()); 72 &net_log_, NetLog::Source());
71 } 73 }
72 74
73 void CompleteCryptoHandshake() { 75 void CompleteCryptoHandshake() {
74 ASSERT_EQ(ERR_IO_PENDING, 76 ASSERT_EQ(ERR_IO_PENDING,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 session_.OnProofVerifyDetailsAvailable(details); 232 session_.OnProofVerifyDetailsAvailable(details);
231 CompleteCryptoHandshake(); 233 CompleteCryptoHandshake();
232 QuicClientSessionPeer::SetChannelIDSent(&session_, true); 234 QuicClientSessionPeer::SetChannelIDSent(&session_, true);
233 235
234 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED)); 236 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED));
235 } 237 }
236 238
237 } // namespace 239 } // namespace
238 } // namespace test 240 } // namespace test
239 } // namespace net 241 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698