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

Unified Diff: net/http/http_network_session.h

Issue 2546533003: Respect QuicAllowed policy for new streams (Closed)
Patch Set: Improve enable_quic_for_new_streams comment Created 4 years 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/http/http_network_session.h
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index f45ea432d5f02a251f33f045a6cd5ff5fdcc6174..94a5243b0652f9c1c702a4b0ffa3c17dc62c98c6 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -68,6 +68,21 @@ class NET_EXPORT HttpNetworkSession
: NON_EXPORTED_BASE(public base::NonThreadSafe),
public base::MemoryCoordinatorClient {
public:
+ // Shared Parameters - one instance of this struct is intended to be shared
+ // accross multiple HttpNetworkSessions (the default copy constructor of
+ // Params just copies the pointer to SharedParams).
+ struct NET_EXPORT SharedParams {
+ SharedParams();
+ SharedParams(const SharedParams& other);
+ ~SharedParams();
+
+ // Enables QUIC for new streams (if QUIC is enabled).
+ // If SharedParams is missing, assume true.
+ // This is intended for disabling QUIC for new streams by user policy
+ // after the net stack has been initialized.
+ bool enable_quic_for_new_streams;
+ };
+
struct NET_EXPORT Params {
Params();
Params(const Params& other);
@@ -92,6 +107,12 @@ class NET_EXPORT HttpNetworkSession
uint16_t testing_fixed_https_port;
bool enable_tcp_fast_open_for_ssl;
+ // Holds parameters which can change after initialization
mmenke 2016/12/08 20:06:44 This aspect seems much more important than the own
pmarko 2016/12/13 06:01:51 Good point - I think DynamicSharedParams is a good
+ // and can be shared accross multiple HttpNetworkSessions.
+ // By default, the pointer is inherited on copy.
+ // May be NULL.
+ SharedParams* shared_dynamic_params;
+
// Use SPDY ping frames to test for connection health after idle.
bool enable_spdy_ping_based_connection_checking;
bool enable_http2;
@@ -195,6 +216,11 @@ class NET_EXPORT HttpNetworkSession
// Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for
// each protocol.
bool http_09_on_non_default_ports_enabled;
+
+ // Evaluates if QUIC is enabled for new streams
+ // This takes into account the general quic_enabled Params member as well
+ // as shared_params, if shared_params was set.
+ bool enable_quic_for_new_streams() const;
};
enum SocketPoolType {

Powered by Google App Engine
This is Rietveld 408576698