Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / io_thread.h
index a989118..801d48d 100644 (file)
@@ -37,12 +37,11 @@ namespace chrome_browser_net {
 class DnsProbeService;
 }
 
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
 namespace data_reduction_proxy {
 class DataReductionProxyAuthRequestHandler;
+class DataReductionProxyDelegate;
 class DataReductionProxyParams;
 }
-#endif  // defined(SPDY_PROXY_AUTH_ORIGIN)
 
 namespace extensions {
 class EventRouterForwarder;
@@ -169,6 +168,7 @@ class IOThread : public content::BrowserThreadDelegate {
     bool ignore_certificate_errors;
     uint16 testing_fixed_http_port;
     uint16 testing_fixed_https_port;
+    Optional<bool> enable_tcp_fast_open_for_ssl;
 
     Optional<size_t> initial_max_spdy_concurrent_streams;
     Optional<bool> force_spdy_single_domain;
@@ -188,6 +188,7 @@ class IOThread : public content::BrowserThreadDelegate {
     Optional<bool> enable_quic_time_based_loss_detection;
     Optional<bool> enable_quic_port_selection;
     Optional<bool> quic_always_require_handshake_confirmation;
+    Optional<bool> quic_disable_connection_pooling;
     Optional<size_t> quic_max_packet_length;
     net::QuicTagVector quic_connection_options;
     Optional<std::string> quic_user_agent_id;
@@ -198,12 +199,12 @@ class IOThread : public content::BrowserThreadDelegate {
     // main frame load fails with a DNS error in order to provide more useful
     // information to the renderer so it can show a more specific error page.
     scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service;
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
-  scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
-      data_reduction_proxy_params;
-  scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
-      data_reduction_proxy_auth_request_handler;
-#endif
+    scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
+        data_reduction_proxy_params;
+    scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
+        data_reduction_proxy_auth_request_handler;
+    scoped_ptr<data_reduction_proxy::DataReductionProxyDelegate>
+        data_reduction_proxy_delegate;
   };
 
   // |net_log| must either outlive the IOThread or be NULL.
@@ -265,6 +266,9 @@ class IOThread : public content::BrowserThreadDelegate {
 
   void InitializeNetworkOptions(const base::CommandLine& parsed_command_line);
 
+  // Sets up TCP FastOpen if enabled via field trials or via the command line.
+  void ConfigureTCPFastOpen(const base::CommandLine& command_line);
+
   // Enable SPDY with the given mode, which may contain the following:
   //
   //   "off"                      : Disables SPDY support entirely.
@@ -311,6 +315,9 @@ class IOThread : public content::BrowserThreadDelegate {
   // well as the QUIC field trial group.
   void ConfigureQuic(const base::CommandLine& command_line);
 
+  // Set up data reduction proxy related objects on IO thread globals.
+  void SetupDataReductionProxy(ChromeNetworkDelegate* network_delegate);
+
   extensions::EventRouterForwarder* extension_event_router_forwarder() {
 #if defined(ENABLE_EXTENSIONS)
     return extension_event_router_forwarder_;
@@ -358,6 +365,10 @@ class IOThread : public content::BrowserThreadDelegate {
   static bool ShouldQuicAlwaysRequireHandshakeConfirmation(
       const VariationParameters& quic_trial_params);
 
+  // Returns true if QUIC should disable connection pooling.
+  static bool ShouldQuicDisableConnectionPooling(
+      const VariationParameters& quic_trial_params);
+
   // Returns the maximum length for QUIC packets, based on any flags in
   // |command_line| or the field trial.  Returns 0 if there is an error
   // parsing any of the options, or if the default value should be used.
@@ -447,10 +458,10 @@ class IOThread : public content::BrowserThreadDelegate {
   // True if SPDY is disabled by policy.
   bool is_spdy_disabled_by_policy_;
 
-  base::WeakPtrFactory<IOThread> weak_factory_;
-
   const base::TimeTicks creation_time_;
 
+  base::WeakPtrFactory<IOThread> weak_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(IOThread);
 };