| 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 return; | 994 return; |
| 999 } | 995 } |
| 1000 | 996 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 | 1156 |
| 1161 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( | 1157 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( |
| 1162 ¶ms->spdy_initial_max_concurrent_streams); | 1158 ¶ms->spdy_initial_max_concurrent_streams); |
| 1163 globals.enable_spdy_compression.CopyToIfSet( | 1159 globals.enable_spdy_compression.CopyToIfSet( |
| 1164 ¶ms->enable_spdy_compression); | 1160 ¶ms->enable_spdy_compression); |
| 1165 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( | 1161 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( |
| 1166 ¶ms->enable_spdy_ping_based_connection_checking); | 1162 ¶ms->enable_spdy_ping_based_connection_checking); |
| 1167 globals.spdy_default_protocol.CopyToIfSet( | 1163 globals.spdy_default_protocol.CopyToIfSet( |
| 1168 ¶ms->spdy_default_protocol); | 1164 ¶ms->spdy_default_protocol); |
| 1169 params->next_protos = globals.next_protos; | 1165 params->next_protos = globals.next_protos; |
| 1170 globals.trusted_spdy_proxy.CopyToIfSet(¶ms->trusted_spdy_proxy); | |
| 1171 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; | 1166 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; |
| 1172 globals.parse_alternative_services.CopyToIfSet( | 1167 globals.parse_alternative_services.CopyToIfSet( |
| 1173 ¶ms->parse_alternative_services); | 1168 ¶ms->parse_alternative_services); |
| 1174 globals.enable_alternative_service_with_different_host.CopyToIfSet( | 1169 globals.enable_alternative_service_with_different_host.CopyToIfSet( |
| 1175 ¶ms->enable_alternative_service_with_different_host); | 1170 ¶ms->enable_alternative_service_with_different_host); |
| 1176 globals.alternative_service_probability_threshold.CopyToIfSet( | 1171 globals.alternative_service_probability_threshold.CopyToIfSet( |
| 1177 ¶ms->alternative_service_probability_threshold); | 1172 ¶ms->alternative_service_probability_threshold); |
| 1178 | 1173 |
| 1179 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); | 1174 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); |
| 1180 | 1175 |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 std::move(job_factory); | 1833 std::move(job_factory); |
| 1839 | 1834 |
| 1840 context->set_job_factory( | 1835 context->set_job_factory( |
| 1841 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1836 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1842 | 1837 |
| 1843 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1838 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1844 // system URLRequestContext too. There's no reason this should be tied to a | 1839 // system URLRequestContext too. There's no reason this should be tied to a |
| 1845 // profile. | 1840 // profile. |
| 1846 return context; | 1841 return context; |
| 1847 } | 1842 } |
| OLD | NEW |