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

Unified Diff: net/http/http_network_session.h

Issue 2546533003: Respect QuicAllowed policy for new streams (Closed)
Patch Set: Naming, formatting 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..0a5da7e5f5839b86cc0c3d189032f664ba48828c 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -68,6 +68,22 @@ class NET_EXPORT HttpNetworkSession
: NON_EXPORTED_BASE(public base::NonThreadSafe),
public base::MemoryCoordinatorClient {
public:
+ // Shared Dynamic Parameters - holds parameters which can change at run time.
+ // One e instance of this struct is intended to be shared accross multiple
mmenke 2016/12/13 18:48:54 "One e" -> "One"
pmarko 2016/12/19 21:25:11 Done.
+ // HttpNetworkSessions (the default copy constructor of Params just copies the
+ // pointer to SharedParams).
+ struct NET_EXPORT DynamicSharedParams {
+ DynamicSharedParams();
+ DynamicSharedParams(const DynamicSharedParams& other);
+ ~DynamicSharedParams();
+
+ // Enables QUIC for new streams (if QUIC is enabled).
+ // If DynamicSharedParams 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 +108,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
+ // and can be shared accross multiple HttpNetworkSessions.
+ // By default, the pointer is inherited on copy.
+ // May be NULL.
+ DynamicSharedParams* dynamic_shared_params;
+
// Use SPDY ping frames to test for connection health after idle.
bool enable_spdy_ping_based_connection_checking;
bool enable_http2;
@@ -195,6 +217,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