| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 // if indicated by user. | 956 // if indicated by user. |
| 957 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported); | 957 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported); |
| 958 } | 958 } |
| 959 | 959 |
| 960 // static | 960 // static |
| 961 void IOThread::ConfigureSpdyGlobals( | 961 void IOThread::ConfigureSpdyGlobals( |
| 962 const base::CommandLine& command_line, | 962 const base::CommandLine& command_line, |
| 963 base::StringPiece spdy_trial_group, | 963 base::StringPiece spdy_trial_group, |
| 964 const VariationParameters& spdy_trial_params, | 964 const VariationParameters& spdy_trial_params, |
| 965 IOThread::Globals* globals) { | 965 IOThread::Globals* globals) { |
| 966 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | |
| 967 globals->trusted_spdy_proxy.set( | |
| 968 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy)); | |
| 969 } | |
| 970 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) | 966 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) |
| 971 net::URLFetcher::SetIgnoreCertificateRequests(true); | 967 net::URLFetcher::SetIgnoreCertificateRequests(true); |
| 972 | 968 |
| 973 if (command_line.HasSwitch(switches::kUseSpdy)) { | 969 if (command_line.HasSwitch(switches::kUseSpdy)) { |
| 974 std::string spdy_mode = | 970 std::string spdy_mode = |
| 975 command_line.GetSwitchValueASCII(switches::kUseSpdy); | 971 command_line.GetSwitchValueASCII(switches::kUseSpdy); |
| 976 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals); | 972 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals); |
| 977 return; | 973 return; |
| 978 } | 974 } |
| 979 | 975 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 | 1121 |
| 1126 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( | 1122 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( |
| 1127 ¶ms->spdy_initial_max_concurrent_streams); | 1123 ¶ms->spdy_initial_max_concurrent_streams); |
| 1128 globals.enable_spdy_compression.CopyToIfSet( | 1124 globals.enable_spdy_compression.CopyToIfSet( |
| 1129 ¶ms->enable_spdy_compression); | 1125 ¶ms->enable_spdy_compression); |
| 1130 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( | 1126 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( |
| 1131 ¶ms->enable_spdy_ping_based_connection_checking); | 1127 ¶ms->enable_spdy_ping_based_connection_checking); |
| 1132 globals.spdy_default_protocol.CopyToIfSet( | 1128 globals.spdy_default_protocol.CopyToIfSet( |
| 1133 ¶ms->spdy_default_protocol); | 1129 ¶ms->spdy_default_protocol); |
| 1134 params->next_protos = globals.next_protos; | 1130 params->next_protos = globals.next_protos; |
| 1135 globals.trusted_spdy_proxy.CopyToIfSet(¶ms->trusted_spdy_proxy); | |
| 1136 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; | 1131 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; |
| 1137 globals.use_alternative_services.CopyToIfSet( | 1132 globals.use_alternative_services.CopyToIfSet( |
| 1138 ¶ms->use_alternative_services); | 1133 ¶ms->use_alternative_services); |
| 1139 globals.alternative_service_probability_threshold.CopyToIfSet( | 1134 globals.alternative_service_probability_threshold.CopyToIfSet( |
| 1140 ¶ms->alternative_service_probability_threshold); | 1135 ¶ms->alternative_service_probability_threshold); |
| 1141 | 1136 |
| 1142 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); | 1137 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); |
| 1143 | 1138 |
| 1144 globals.enable_brotli.CopyToIfSet(¶ms->enable_brotli); | 1139 globals.enable_brotli.CopyToIfSet(¶ms->enable_brotli); |
| 1145 | 1140 |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 std::move(job_factory); | 1776 std::move(job_factory); |
| 1782 | 1777 |
| 1783 context->set_job_factory( | 1778 context->set_job_factory( |
| 1784 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1779 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1785 | 1780 |
| 1786 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1781 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1787 // system URLRequestContext too. There's no reason this should be tied to a | 1782 // system URLRequestContext too. There's no reason this should be tied to a |
| 1788 // profile. | 1783 // profile. |
| 1789 return context; | 1784 return context; |
| 1790 } | 1785 } |
| OLD | NEW |