OLD | NEW |
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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 // if indicated by user. | 977 // if indicated by user. |
978 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported); | 978 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported); |
979 } | 979 } |
980 | 980 |
981 // static | 981 // static |
982 void IOThread::ConfigureSpdyGlobals( | 982 void IOThread::ConfigureSpdyGlobals( |
983 const base::CommandLine& command_line, | 983 const base::CommandLine& command_line, |
984 base::StringPiece spdy_trial_group, | 984 base::StringPiece spdy_trial_group, |
985 const VariationParameters& spdy_trial_params, | 985 const VariationParameters& spdy_trial_params, |
986 IOThread::Globals* globals) { | 986 IOThread::Globals* globals) { |
987 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | |
988 globals->trusted_spdy_proxy.set( | |
989 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy)); | |
990 } | |
991 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) | 987 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) |
992 net::URLFetcher::SetIgnoreCertificateRequests(true); | 988 net::URLFetcher::SetIgnoreCertificateRequests(true); |
993 | 989 |
994 if (command_line.HasSwitch(switches::kUseSpdy)) { | 990 if (command_line.HasSwitch(switches::kUseSpdy)) { |
995 std::string spdy_mode = | 991 std::string spdy_mode = |
996 command_line.GetSwitchValueASCII(switches::kUseSpdy); | 992 command_line.GetSwitchValueASCII(switches::kUseSpdy); |
997 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals); | 993 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals); |
998 // TODO(bnc): https://crbug.com/547781 | 994 // TODO(bnc): https://crbug.com/547781 |
999 // This command line flag is broken. | 995 // This command line flag is broken. |
1000 globals->enable_spdy31.set(false); | 996 globals->enable_spdy31.set(false); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( | 1159 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( |
1164 ¶ms->spdy_initial_max_concurrent_streams); | 1160 ¶ms->spdy_initial_max_concurrent_streams); |
1165 globals.enable_spdy_compression.CopyToIfSet( | 1161 globals.enable_spdy_compression.CopyToIfSet( |
1166 ¶ms->enable_spdy_compression); | 1162 ¶ms->enable_spdy_compression); |
1167 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( | 1163 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( |
1168 ¶ms->enable_spdy_ping_based_connection_checking); | 1164 ¶ms->enable_spdy_ping_based_connection_checking); |
1169 globals.spdy_default_protocol.CopyToIfSet( | 1165 globals.spdy_default_protocol.CopyToIfSet( |
1170 ¶ms->spdy_default_protocol); | 1166 ¶ms->spdy_default_protocol); |
1171 globals.enable_spdy31.CopyToIfSet(¶ms->enable_spdy31); | 1167 globals.enable_spdy31.CopyToIfSet(¶ms->enable_spdy31); |
1172 globals.enable_http2.CopyToIfSet(¶ms->enable_http2); | 1168 globals.enable_http2.CopyToIfSet(¶ms->enable_http2); |
1173 globals.trusted_spdy_proxy.CopyToIfSet(¶ms->trusted_spdy_proxy); | |
1174 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; | 1169 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; |
1175 globals.parse_alternative_services.CopyToIfSet( | 1170 globals.parse_alternative_services.CopyToIfSet( |
1176 ¶ms->parse_alternative_services); | 1171 ¶ms->parse_alternative_services); |
1177 globals.enable_alternative_service_with_different_host.CopyToIfSet( | 1172 globals.enable_alternative_service_with_different_host.CopyToIfSet( |
1178 ¶ms->enable_alternative_service_with_different_host); | 1173 ¶ms->enable_alternative_service_with_different_host); |
1179 globals.alternative_service_probability_threshold.CopyToIfSet( | 1174 globals.alternative_service_probability_threshold.CopyToIfSet( |
1180 ¶ms->alternative_service_probability_threshold); | 1175 ¶ms->alternative_service_probability_threshold); |
1181 | 1176 |
1182 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); | 1177 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); |
1183 | 1178 |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 std::move(job_factory); | 1836 std::move(job_factory); |
1842 | 1837 |
1843 context->set_job_factory( | 1838 context->set_job_factory( |
1844 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1839 globals->proxy_script_fetcher_url_request_job_factory.get()); |
1845 | 1840 |
1846 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1841 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1847 // system URLRequestContext too. There's no reason this should be tied to a | 1842 // system URLRequestContext too. There's no reason this should be tied to a |
1848 // profile. | 1843 // profile. |
1849 return context; | 1844 return context; |
1850 } | 1845 } |
OLD | NEW |