Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CONFIG_H_ | 5 #ifndef NET_QUIC_QUIC_CONFIG_H_ |
| 6 #define NET_QUIC_QUIC_CONFIG_H_ | 6 #define NET_QUIC_QUIC_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 HelloType hello_type, | 208 HelloType hello_type, |
| 209 std::string* error_details) OVERRIDE; | 209 std::string* error_details) OVERRIDE; |
| 210 | 210 |
| 211 private: | 211 private: |
| 212 QuicTag send_value_; | 212 QuicTag send_value_; |
| 213 bool has_send_value_; | 213 bool has_send_value_; |
| 214 QuicTag receive_value_; | 214 QuicTag receive_value_; |
| 215 bool has_receive_value_; | 215 bool has_receive_value_; |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 // Stores tag from CHLO or SHLO messages that are not negotiated. | |
|
wtc
2014/06/03 02:00:53
1. If I only read this class declaration, I have n
Ian Swett
2014/06/03 13:31:29
Agreed on documentation. This class follows the p
| |
| 219 class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue { | |
| 220 public: | |
| 221 QuicFixedTagVector(QuicTag name, QuicConfigPresence presence); | |
| 222 virtual ~QuicFixedTagVector(); | |
| 223 | |
| 224 bool HasSendValues() const; | |
| 225 | |
| 226 QuicTagVector GetSendValues() const; | |
| 227 | |
| 228 void SetSendValues(const QuicTagVector& values); | |
| 229 | |
| 230 bool HasReceivedValues() const; | |
| 231 | |
| 232 QuicTagVector GetReceivedValues() const; | |
| 233 | |
| 234 void SetReceivedValues(const QuicTagVector& values); | |
|
wtc
2014/06/03 02:00:53
Nit: document "send values" and "receive values"
| |
| 235 | |
| 236 // If has_send_value is true, serialises |tag_vector_| and |send_value_| to | |
|
wtc
2014/06/03 02:00:53
Nit: this comment seems stale.
"has_send_value" i
| |
| 237 // |out|. | |
| 238 virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE; | |
| 239 | |
| 240 // Sets |receive_values_| to the corresponding value from |client_hello_| if | |
|
wtc
2014/06/03 02:00:53
1. Typo: client_hello_ => peer_hello
2. "if it ex
| |
| 241 // it exists. | |
| 242 virtual QuicErrorCode ProcessPeerHello( | |
| 243 const CryptoHandshakeMessage& peer_hello, | |
| 244 HelloType hello_type, | |
|
wtc
2014/06/03 02:00:53
Nit: I believe |hello_type| can be inferred from p
| |
| 245 std::string* error_details) OVERRIDE; | |
| 246 | |
| 247 private: | |
| 248 QuicTagVector send_values_; | |
| 249 bool has_send_values_; | |
| 250 QuicTagVector receive_values_; | |
| 251 bool has_receive_values_; | |
| 252 }; | |
| 253 | |
| 218 // QuicConfig contains non-crypto configuration options that are negotiated in | 254 // QuicConfig contains non-crypto configuration options that are negotiated in |
| 219 // the crypto handshake. | 255 // the crypto handshake. |
| 220 class NET_EXPORT_PRIVATE QuicConfig { | 256 class NET_EXPORT_PRIVATE QuicConfig { |
| 221 public: | 257 public: |
| 222 QuicConfig(); | 258 QuicConfig(); |
| 223 ~QuicConfig(); | 259 ~QuicConfig(); |
| 224 | 260 |
| 225 void set_congestion_control(const QuicTagVector& congestion_control, | 261 void set_congestion_feedback(const QuicTagVector& congestion_feedback, |
| 226 QuicTag default_congestion_control); | 262 QuicTag default_congestion_feedback); |
| 227 | 263 |
| 228 QuicTag congestion_control() const; | 264 QuicTag congestion_feedback() const; |
| 265 | |
| 266 void SetCongestionOptionsToSend(const QuicTagVector& congestion_options); | |
| 267 | |
| 268 bool HasReceivedCongestionOptions() const; | |
| 269 | |
| 270 QuicTagVector ReceivedCongestionOptions() const; | |
| 229 | 271 |
| 230 void SetLossDetectionToSend(QuicTag loss_detection); | 272 void SetLossDetectionToSend(QuicTag loss_detection); |
| 231 | 273 |
| 232 bool HasReceivedLossDetection() const; | 274 bool HasReceivedLossDetection() const; |
| 233 | 275 |
| 234 QuicTag ReceivedLossDetection() const; | 276 QuicTag ReceivedLossDetection() const; |
| 235 | 277 |
| 236 void set_idle_connection_state_lifetime( | 278 void set_idle_connection_state_lifetime( |
| 237 QuicTime::Delta max_idle_connection_state_lifetime, | 279 QuicTime::Delta max_idle_connection_state_lifetime, |
| 238 QuicTime::Delta default_idle_conection_state_lifetime); | 280 QuicTime::Delta default_idle_conection_state_lifetime); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 // Calls ProcessPeerHello on each negotiable parameter. On failure returns | 329 // Calls ProcessPeerHello on each negotiable parameter. On failure returns |
| 288 // the corresponding QuicErrorCode and sets detailed error in |error_details|. | 330 // the corresponding QuicErrorCode and sets detailed error in |error_details|. |
| 289 QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello, | 331 QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello, |
| 290 HelloType hello_type, | 332 HelloType hello_type, |
| 291 std::string* error_details); | 333 std::string* error_details); |
| 292 | 334 |
| 293 private: | 335 private: |
| 294 friend class test::QuicConfigPeer; | 336 friend class test::QuicConfigPeer; |
| 295 | 337 |
| 296 // Congestion control feedback type. | 338 // Congestion control feedback type. |
| 297 QuicNegotiableTag congestion_control_; | 339 QuicNegotiableTag congestion_feedback_; |
| 340 // Congestion control option. | |
|
wtc
2014/06/03 02:00:53
Nit: option => options
| |
| 341 QuicFixedTagVector congestion_options_; | |
| 298 // Loss detection feedback type. | 342 // Loss detection feedback type. |
| 299 QuicFixedTag loss_detection_; | 343 QuicFixedTag loss_detection_; |
| 300 // Idle connection state lifetime | 344 // Idle connection state lifetime |
| 301 QuicNegotiableUint32 idle_connection_state_lifetime_seconds_; | 345 QuicNegotiableUint32 idle_connection_state_lifetime_seconds_; |
| 302 // Keepalive timeout, or 0 to turn off keepalive probes | 346 // Keepalive timeout, or 0 to turn off keepalive probes |
| 303 QuicNegotiableUint32 keepalive_timeout_seconds_; | 347 QuicNegotiableUint32 keepalive_timeout_seconds_; |
| 304 // Maximum number of streams that the connection can support. | 348 // Maximum number of streams that the connection can support. |
| 305 QuicNegotiableUint32 max_streams_per_connection_; | 349 QuicNegotiableUint32 max_streams_per_connection_; |
| 306 // Maximum time till the session can be alive before crypto handshake is | 350 // Maximum time till the session can be alive before crypto handshake is |
| 307 // finished. (Not negotiated). | 351 // finished. (Not negotiated). |
| 308 QuicTime::Delta max_time_before_crypto_handshake_; | 352 QuicTime::Delta max_time_before_crypto_handshake_; |
| 309 // Initial congestion window in packets. | 353 // Initial congestion window in packets. |
| 310 QuicFixedUint32 initial_congestion_window_; | 354 QuicFixedUint32 initial_congestion_window_; |
| 311 // Initial round trip time estimate in microseconds. | 355 // Initial round trip time estimate in microseconds. |
| 312 QuicFixedUint32 initial_round_trip_time_us_; | 356 QuicFixedUint32 initial_round_trip_time_us_; |
| 313 // Initial flow control receive window in bytes. | 357 // Initial flow control receive window in bytes. |
| 314 QuicFixedUint32 initial_flow_control_window_bytes_; | 358 QuicFixedUint32 initial_flow_control_window_bytes_; |
| 315 }; | 359 }; |
| 316 | 360 |
| 317 } // namespace net | 361 } // namespace net |
| 318 | 362 |
| 319 #endif // NET_QUIC_QUIC_CONFIG_H_ | 363 #endif // NET_QUIC_QUIC_CONFIG_H_ |
| OLD | NEW |