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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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( 17 QuicClientSession::QuicClientSession(const QuicServerId& server_id,
18 const QuicServerId& server_id, 18 const QuicConfig& config,
19 const QuicConfig& config, 19 QuicConnection* connection,
20 QuicConnection* connection, 20 QuicCryptoClientConfig* crypto_config)
21 QuicCryptoClientConfig* crypto_config)
22 : QuicClientSessionBase(connection, config), 21 : QuicClientSessionBase(connection, config),
23 crypto_stream_(server_id, this, NULL, crypto_config) { 22 crypto_stream_(server_id, this, NULL, crypto_config) {
24 } 23 }
25 24
26 QuicClientSession::~QuicClientSession() { 25 QuicClientSession::~QuicClientSession() {
27 } 26 }
28 27
29 void QuicClientSession::OnProofValid( 28 void QuicClientSession::OnProofValid(
30 const QuicCryptoClientConfig::CachedState& /*cached*/) { 29 const QuicCryptoClientConfig::CachedState& /*cached*/) {
31 } 30 }
(...skipping 10 matching lines...) Expand all
42 if (GetNumOpenStreams() >= get_max_open_streams()) { 41 if (GetNumOpenStreams() >= get_max_open_streams()) {
43 DVLOG(1) << "Failed to create a new outgoing stream. " 42 DVLOG(1) << "Failed to create a new outgoing stream. "
44 << "Already " << GetNumOpenStreams() << " open."; 43 << "Already " << GetNumOpenStreams() << " open.";
45 return NULL; 44 return NULL;
46 } 45 }
47 if (goaway_received()) { 46 if (goaway_received()) {
48 DVLOG(1) << "Failed to create a new outgoing stream. " 47 DVLOG(1) << "Failed to create a new outgoing stream. "
49 << "Already received goaway."; 48 << "Already received goaway.";
50 return NULL; 49 return NULL;
51 } 50 }
52 QuicSpdyClientStream* stream 51 QuicSpdyClientStream* stream =
53 = new QuicSpdyClientStream(GetNextStreamId(), this); 52 new QuicSpdyClientStream(GetNextStreamId(), this);
54 ActivateStream(stream); 53 ActivateStream(stream);
55 return stream; 54 return stream;
56 } 55 }
57 56
58 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { 57 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() {
59 return &crypto_stream_; 58 return &crypto_stream_;
60 } 59 }
61 60
62 bool QuicClientSession::CryptoConnect() { 61 bool QuicClientSession::CryptoConnect() {
63 return crypto_stream_.CryptoConnect(); 62 return crypto_stream_.CryptoConnect();
64 } 63 }
65 64
66 int QuicClientSession::GetNumSentClientHellos() const { 65 int QuicClientSession::GetNumSentClientHellos() const {
67 return crypto_stream_.num_sent_client_hellos(); 66 return crypto_stream_.num_sent_client_hellos();
68 } 67 }
69 68
70 QuicDataStream* QuicClientSession::CreateIncomingDataStream( 69 QuicDataStream* QuicClientSession::CreateIncomingDataStream(QuicStreamId id) {
71 QuicStreamId id) {
72 DLOG(ERROR) << "Server push not supported"; 70 DLOG(ERROR) << "Server push not supported";
73 return NULL; 71 return NULL;
74 } 72 }
75 73
76 } // namespace tools 74 } // namespace tools
77 } // namespace net 75 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698