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

Side by Side Diff: net/tools/quic/quic_client_session.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/tools/quic/quic_client_session.h ('k') | net/tools/quic/quic_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 (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/tools/quic/quic_client_session.h" 5 #include "net/tools/quic/quic_client_session.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/crypto/crypto_protocol.h" 8 #include "net/quic/crypto/crypto_protocol.h"
9 #include "net/quic/quic_server_id.h" 9 #include "net/quic/quic_server_id.h"
10 #include "net/tools/quic/quic_spdy_client_stream.h" 10 #include "net/tools/quic/quic_spdy_client_stream.h"
11 11
12 using std::string; 12 using std::string;
13 13
14 namespace net { 14 namespace net {
15 namespace tools { 15 namespace tools {
16 16
17 QuicClientSession::QuicClientSession(const QuicConfig& config, 17 QuicClientSession::QuicClientSession(const QuicConfig& config,
18 QuicConnection* connection, 18 QuicConnection* connection)
19 bool is_secure) 19 : QuicClientSessionBase(connection, config) {
20 : QuicClientSessionBase(connection, config, is_secure) {
21 } 20 }
22 21
23 QuicClientSession::~QuicClientSession() { 22 QuicClientSession::~QuicClientSession() {
24 } 23 }
25 24
26 void QuicClientSession::InitializeSession( 25 void QuicClientSession::InitializeSession(
27 const QuicServerId& server_id, 26 const QuicServerId& server_id,
28 QuicCryptoClientConfig* crypto_config) { 27 QuicCryptoClientConfig* crypto_config) {
29 QuicClientSessionBase::InitializeSession();
30 crypto_stream_.reset( 28 crypto_stream_.reset(
31 new QuicCryptoClientStream(server_id, this, nullptr, crypto_config)); 29 new QuicCryptoClientStream(server_id, this, nullptr, crypto_config));
30 QuicClientSessionBase::InitializeSession();
32 } 31 }
33 32
34 void QuicClientSession::OnProofValid( 33 void QuicClientSession::OnProofValid(
35 const QuicCryptoClientConfig::CachedState& /*cached*/) { 34 const QuicCryptoClientConfig::CachedState& /*cached*/) {}
36 }
37 35
38 void QuicClientSession::OnProofVerifyDetailsAvailable( 36 void QuicClientSession::OnProofVerifyDetailsAvailable(
39 const ProofVerifyDetails& /*verify_details*/) { 37 const ProofVerifyDetails& /*verify_details*/) {}
40 }
41 38
42 QuicSpdyClientStream* QuicClientSession::CreateOutgoingDataStream() { 39 QuicSpdyClientStream* QuicClientSession::CreateOutgoingDataStream() {
43 if (!crypto_stream_->encryption_established()) { 40 if (!crypto_stream_->encryption_established()) {
44 DVLOG(1) << "Encryption not active so no outgoing stream created."; 41 DVLOG(1) << "Encryption not active so no outgoing stream created.";
45 return nullptr; 42 return nullptr;
46 } 43 }
47 if (GetNumOpenStreams() >= get_max_open_streams()) { 44 if (GetNumOpenStreams() >= get_max_open_streams()) {
48 DVLOG(1) << "Failed to create a new outgoing stream. " 45 DVLOG(1) << "Failed to create a new outgoing stream. "
49 << "Already " << GetNumOpenStreams() << " open."; 46 << "Already " << GetNumOpenStreams() << " open.";
50 return nullptr; 47 return nullptr;
(...skipping 23 matching lines...) Expand all
74 } 71 }
75 72
76 QuicDataStream* QuicClientSession::CreateIncomingDataStream( 73 QuicDataStream* QuicClientSession::CreateIncomingDataStream(
77 QuicStreamId id) { 74 QuicStreamId id) {
78 DLOG(ERROR) << "Server push not supported"; 75 DLOG(ERROR) << "Server push not supported";
79 return nullptr; 76 return nullptr;
80 } 77 }
81 78
82 } // namespace tools 79 } // namespace tools
83 } // namespace net 80 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session.h ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698