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

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

Issue 944883003: QUIC - Cache the connection type and connection description. Make the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments to Patch Set 5 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 25 matching lines...) Expand all
36 namespace { 36 namespace {
37 37
38 const char kServerHostname[] = "www.example.org"; 38 const char kServerHostname[] = "www.example.org";
39 const uint16 kServerPort = 80; 39 const uint16 kServerPort = 80;
40 40
41 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { 41 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> {
42 protected: 42 protected:
43 QuicClientSessionTest() 43 QuicClientSessionTest()
44 : connection_( 44 : connection_(
45 new PacketSavingConnection(false, SupportedVersions(GetParam()))), 45 new PacketSavingConnection(false, SupportedVersions(GetParam()))),
46 session_(connection_, GetSocket().Pass(), nullptr, 46 session_(connection_,
47 GetSocket().Pass(),
48 nullptr,
47 &transport_security_state_, 49 &transport_security_state_,
48 make_scoped_ptr((QuicServerInfo*)nullptr), DefaultQuicConfig(), 50 make_scoped_ptr((QuicServerInfo*)nullptr),
51 DefaultQuicConfig(),
52 "CONNECTION_UNKNOWN",
49 base::MessageLoop::current()->message_loop_proxy().get(), 53 base::MessageLoop::current()->message_loop_proxy().get(),
50 &net_log_) { 54 &net_log_) {
51 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, 55 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort,
52 /*is_secure=*/false, 56 /*is_secure=*/false,
53 PRIVACY_MODE_DISABLED), 57 PRIVACY_MODE_DISABLED),
54 &crypto_config_, nullptr); 58 &crypto_config_, nullptr);
55 // Advance the time, because timers do not like uninitialized times. 59 // Advance the time, because timers do not like uninitialized times.
56 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); 60 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
57 } 61 }
58 62
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 session_.OnProofVerifyDetailsAvailable(details); 229 session_.OnProofVerifyDetailsAvailable(details);
226 CompleteCryptoHandshake(); 230 CompleteCryptoHandshake();
227 QuicClientSessionPeer::SetChannelIDSent(&session_, true); 231 QuicClientSessionPeer::SetChannelIDSent(&session_, true);
228 232
229 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED)); 233 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED));
230 } 234 }
231 235
232 } // namespace 236 } // namespace
233 } // namespace test 237 } // namespace test
234 } // namespace net 238 } // 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