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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 451383002: Plumbing for TCP FastOpen for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TFO not enabled when Happy Eyeballs may be used. Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 } 836 }
837 837
838 if (command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) 838 if (command_line.HasSwitch(switches::kEnableWebSocketOverSpdy))
839 globals_->enable_websocket_over_spdy.set(true); 839 globals_->enable_websocket_over_spdy.set(true);
840 } 840 }
841 841
842 // TODO(rch): Make the client socket factory a per-network session 842 // TODO(rch): Make the client socket factory a per-network session
843 // instance, constructed from a NetworkSession::Params, to allow us 843 // instance, constructed from a NetworkSession::Params, to allow us
844 // to move this option to IOThread::Globals & 844 // to move this option to IOThread::Globals &
845 // HttpNetworkSession::Params. 845 // HttpNetworkSession::Params.
846 bool always_enable_if_supported = false;
846 if (command_line.HasSwitch(switches::kEnableTcpFastOpen)) 847 if (command_line.HasSwitch(switches::kEnableTcpFastOpen))
847 net::SetTCPFastOpenEnabled(true); 848 always_enable_if_supported = true;
mmenke 2014/09/09 14:29:28 optional nit: Could just merge these into one sta
Jana 2014/09/10 16:03:11 I had just done exactly this nit fixing, so done :
849 // Checks for OS support of TCP FastOpen, and turns it on for all connections
850 // if indicated by user above.
851 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported);
848 } 852 }
849 853
850 void IOThread::ConfigureSpdyFromTrial(const std::string& spdy_trial_group, 854 void IOThread::ConfigureSpdyFromTrial(const std::string& spdy_trial_group,
851 Globals* globals) { 855 Globals* globals) {
852 if (spdy_trial_group == kSpdyFieldTrialHoldbackGroupName) { 856 if (spdy_trial_group == kSpdyFieldTrialHoldbackGroupName) {
853 // TODO(jgraettinger): Use net::NextProtosHttpOnly() instead? 857 // TODO(jgraettinger): Use net::NextProtosHttpOnly() instead?
854 net::HttpStreamFactory::set_spdy_enabled(false); 858 net::HttpStreamFactory::set_spdy_enabled(false);
855 } else if (spdy_trial_group == kSpdyFieldTrialHoldbackControlGroupName) { 859 } else if (spdy_trial_group == kSpdyFieldTrialHoldbackControlGroupName) {
856 // Use the current SPDY default (SPDY/3.1). 860 // Use the current SPDY default (SPDY/3.1).
857 globals->next_protos = net::NextProtosSpdy31(); 861 globals->next_protos = net::NextProtosSpdy31();
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1399 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1396 for (size_t i = 0; i < supported_versions.size(); ++i) { 1400 for (size_t i = 0; i < supported_versions.size(); ++i) {
1397 net::QuicVersion version = supported_versions[i]; 1401 net::QuicVersion version = supported_versions[i];
1398 if (net::QuicVersionToString(version) == quic_version) { 1402 if (net::QuicVersionToString(version) == quic_version) {
1399 return version; 1403 return version;
1400 } 1404 }
1401 } 1405 }
1402 1406
1403 return net::QUIC_VERSION_UNSUPPORTED; 1407 return net::QUIC_VERSION_UNSUPPORTED;
1404 } 1408 }
OLDNEW
« no previous file with comments | « no previous file | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | net/socket/transport_client_socket_pool.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698