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

Side by Side Diff: net/quic/quic_crypto_server_stream.h

Issue 623003002: QUIC: if client provides an STK which includes CachedNetworkParams, then (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « net/quic/crypto/source_address_token.cc ('k') | net/quic/quic_crypto_server_stream.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 #ifndef NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
6 #define NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 6 #define NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/quic/crypto/crypto_handshake.h" 10 #include "net/quic/crypto/crypto_handshake.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // presented a ChannelID. Otherwise it returns false. 67 // presented a ChannelID. Otherwise it returns false.
68 bool GetBase64SHA256ClientChannelID(std::string* output) const; 68 bool GetBase64SHA256ClientChannelID(std::string* output) const;
69 69
70 uint8 num_handshake_messages() const { return num_handshake_messages_; } 70 uint8 num_handshake_messages() const { return num_handshake_messages_; }
71 71
72 int num_server_config_update_messages_sent() const { 72 int num_server_config_update_messages_sent() const {
73 return num_server_config_update_messages_sent_; 73 return num_server_config_update_messages_sent_;
74 } 74 }
75 75
76 // Sends the latest server config and source-address token to the client. 76 // Sends the latest server config and source-address token to the client.
77 // |on_handshake_complete| is true when this is called immediately after
78 // handshake completes, and should be false for subsequent updates.
77 virtual void SendServerConfigUpdate( 79 virtual void SendServerConfigUpdate(
78 const CachedNetworkParameters* cached_network_params); 80 const CachedNetworkParameters* cached_network_params,
81 bool on_handshake_complete);
79 82
80 // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the 83 // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the
81 // client. 84 // client.
82 void OnServerHelloAcked(); 85 void OnServerHelloAcked();
83 86
84 protected: 87 protected:
85 virtual QuicErrorCode ProcessClientHello( 88 virtual QuicErrorCode ProcessClientHello(
86 const CryptoHandshakeMessage& message, 89 const CryptoHandshakeMessage& message,
87 const ValidateClientHelloResultCallback::Result& result, 90 const ValidateClientHelloResultCallback::Result& result,
88 CryptoHandshakeMessage* reply, 91 CryptoHandshakeMessage* reply,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // FinishProcessingHandshakeMessage for processing. nullptr if no 129 // FinishProcessingHandshakeMessage for processing. nullptr if no
127 // handshake message is being validated. 130 // handshake message is being validated.
128 ValidateCallback* validate_client_hello_cb_; 131 ValidateCallback* validate_client_hello_cb_;
129 132
130 // Number of handshake messages received by this stream. 133 // Number of handshake messages received by this stream.
131 uint8 num_handshake_messages_; 134 uint8 num_handshake_messages_;
132 135
133 // Number of server config update (SCUP) messages sent by this stream. 136 // Number of server config update (SCUP) messages sent by this stream.
134 int num_server_config_update_messages_sent_; 137 int num_server_config_update_messages_sent_;
135 138
139 // If the client provides CachedNetworkParameters in the STK in the CHLO, then
140 // store here, and send back in future STKs if we have no better bandwidth
141 // estimate to send.
142 scoped_ptr<CachedNetworkParameters> previous_cached_network_params_;
143
136 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream); 144 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream);
137 }; 145 };
138 146
139 } // namespace net 147 } // namespace net
140 148
141 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 149 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/source_address_token.cc ('k') | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698