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

Unified Diff: net/quic/quic_config.h

Issue 308273004: Allow QUIC's BBR congestion control to be negotiated in the crypto (Closed) 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_config.h
diff --git a/net/quic/quic_config.h b/net/quic/quic_config.h
index 88ad8b6a91c602d7e5a4e6058d74269a2c4bb5c9..4d65097bc85aadfae93c28bf541a7d97aae23a80 100644
--- a/net/quic/quic_config.h
+++ b/net/quic/quic_config.h
@@ -215,6 +215,42 @@ class NET_EXPORT_PRIVATE QuicFixedTag : public QuicConfigValue {
bool has_receive_value_;
};
+// 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
+class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue {
+ public:
+ QuicFixedTagVector(QuicTag name, QuicConfigPresence presence);
+ virtual ~QuicFixedTagVector();
+
+ bool HasSendValues() const;
+
+ QuicTagVector GetSendValues() const;
+
+ void SetSendValues(const QuicTagVector& values);
+
+ bool HasReceivedValues() const;
+
+ QuicTagVector GetReceivedValues() const;
+
+ void SetReceivedValues(const QuicTagVector& values);
wtc 2014/06/03 02:00:53 Nit: document "send values" and "receive values"
+
+ // 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
+ // |out|.
+ virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE;
+
+ // 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
+ // it exists.
+ virtual QuicErrorCode ProcessPeerHello(
+ const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
wtc 2014/06/03 02:00:53 Nit: I believe |hello_type| can be inferred from p
+ std::string* error_details) OVERRIDE;
+
+ private:
+ QuicTagVector send_values_;
+ bool has_send_values_;
+ QuicTagVector receive_values_;
+ bool has_receive_values_;
+};
+
// QuicConfig contains non-crypto configuration options that are negotiated in
// the crypto handshake.
class NET_EXPORT_PRIVATE QuicConfig {
@@ -222,10 +258,16 @@ class NET_EXPORT_PRIVATE QuicConfig {
QuicConfig();
~QuicConfig();
- void set_congestion_control(const QuicTagVector& congestion_control,
- QuicTag default_congestion_control);
+ void set_congestion_feedback(const QuicTagVector& congestion_feedback,
+ QuicTag default_congestion_feedback);
+
+ QuicTag congestion_feedback() const;
+
+ void SetCongestionOptionsToSend(const QuicTagVector& congestion_options);
+
+ bool HasReceivedCongestionOptions() const;
- QuicTag congestion_control() const;
+ QuicTagVector ReceivedCongestionOptions() const;
void SetLossDetectionToSend(QuicTag loss_detection);
@@ -294,7 +336,9 @@ class NET_EXPORT_PRIVATE QuicConfig {
friend class test::QuicConfigPeer;
// Congestion control feedback type.
- QuicNegotiableTag congestion_control_;
+ QuicNegotiableTag congestion_feedback_;
+ // Congestion control option.
wtc 2014/06/03 02:00:53 Nit: option => options
+ QuicFixedTagVector congestion_options_;
// Loss detection feedback type.
QuicFixedTag loss_detection_;
// Idle connection state lifetime

Powered by Google App Engine
This is Rietveld 408576698