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

Unified Diff: net/http/http_network_session.h

Issue 2546533003: Respect QuicAllowed policy for new streams (Closed)
Patch Set: IOS io_thread also initializes DynamicSharedParams 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 f1402bfae2908ed943c496809d2ab0037e74fdcb..f14501f2060c286cd888f969fca479a613abf7c5 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -70,6 +70,20 @@ 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 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 DynamicSharedParams {
+ DynamicSharedParams();
+ DynamicSharedParams(const DynamicSharedParams& other);
+ ~DynamicSharedParams();
+
+ // Enables QUIC for new streams (if QUIC is enabled).
+ // If DynamicSharedParams is missing, assume false.
+ bool enable_quic;
Ryan Hamilton 2016/12/20 15:38:12 nit: quic_enabled might be a better choice since i
pmarko 2016/12/20 18:00:37 I also thought so at first, but then I wanted to m
Ryan Hamilton 2016/12/21 21:23:58 Ah, fair enough. Let's remain consistent.
pmarko 2016/12/23 19:19:46 (obsolete - Params has been reverted)
+ };
+
struct NET_EXPORT Params {
Params();
Params(const Params& other);
@@ -94,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 nullptr
Bence 2016/12/20 14:58:07 Please append period to last sentence.
Ryan Hamilton 2016/12/20 15:38:12 I'm ramping up on this CL, so sorry for the basic
pmarko 2016/12/20 18:00:37 Bence: Done. Ryan: Good point! Basically, by intr
Ryan Hamilton 2016/12/21 21:23:58 Hm. I think you're saying that the dynamic params
pmarko 2016/12/23 19:19:46 See my reply in comments thread - you're right tha
+ DynamicSharedParams* dynamic_shared_params;
Ryan Hamilton 2016/12/20 15:38:12 I'm surprised not to see any cronet code which set
pmarko 2016/12/20 18:00:37 Good point! Didn't think of cronet, but it should
Ryan Hamilton 2016/12/21 21:23:58 Ah, good point.
pmarko 2016/12/23 19:19:46 (obsolete - Params has been reverted)
+
// Use SPDY ping frames to test for connection health after idle.
bool enable_spdy_ping_based_connection_checking;
bool enable_http2;
@@ -108,8 +128,6 @@ class NET_EXPORT HttpNetworkSession
// of the origin.
bool enable_quic_alternative_service_with_different_host;
- // Enables QUIC support.
- bool enable_quic;
// Disable QUIC if a connection times out with open streams.
bool disable_quic_on_timeout_with_open_streams;
// Disables QUIC's 0-RTT behavior.
@@ -194,6 +212,9 @@ 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
Bence 2016/12/20 14:58:07 Please append period to this sentence.
pmarko 2016/12/20 18:00:37 Done.
+ bool enable_quic() const;
Bence 2016/12/20 14:58:07 Please move this up to right after the destructor:
Ryan Hamilton 2016/12/20 15:38:12 The style guide prohibits methods on structs. Perh
pmarko 2016/12/20 18:00:37 Bence: Probably obselete now :) Ryan: Ah, I didn'
};
enum SocketPoolType {

Powered by Google App Engine
This is Rietveld 408576698