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

Side by Side Diff: components/cronet/url_request_context_config.cc

Issue 2738813004: [Cronet] Write effective experimental options to NetLog (Closed)
Patch Set: Address mgersh comment Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/cronet/url_request_context_config.h" 5 #include "components/cronet/url_request_context_config.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const char kHostResolverRulesFieldTrialName[] = "HostResolverRules"; 82 const char kHostResolverRulesFieldTrialName[] = "HostResolverRules";
83 const char kHostResolverRules[] = "host_resolver_rules"; 83 const char kHostResolverRules[] = "host_resolver_rules";
84 84
85 // Disable IPv6. This should almost never be necessary because the network stack 85 // Disable IPv6. This should almost never be necessary because the network stack
86 // has IPv6 detection logic. Please do not turn on this option without first 86 // has IPv6 detection logic. Please do not turn on this option without first
87 // reporting a bug. See http://crbug.com/696569 for the currently known issue. 87 // reporting a bug. See http://crbug.com/696569 for the currently known issue.
88 const char kDisableIPv6[] = "disable_ipv6"; 88 const char kDisableIPv6[] = "disable_ipv6";
89 89
90 const char kSSLKeyLogFile[] = "ssl_key_log_file"; 90 const char kSSLKeyLogFile[] = "ssl_key_log_file";
91 91
92 void ParseAndSetExperimentalOptions( 92 // Returns the effective experimental options.
93 std::unique_ptr<base::DictionaryValue> ParseAndSetExperimentalOptions(
93 const std::string& experimental_options, 94 const std::string& experimental_options,
94 net::URLRequestContextBuilder* context_builder, 95 net::URLRequestContextBuilder* context_builder,
95 net::NetLog* net_log, 96 net::NetLog* net_log,
96 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) { 97 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) {
97 if (experimental_options.empty()) 98 if (experimental_options.empty())
98 return; 99 return nullptr;
99 100
100 DCHECK(net_log); 101 DCHECK(net_log);
101 102
102 DVLOG(1) << "Experimental Options:" << experimental_options; 103 DVLOG(1) << "Experimental Options:" << experimental_options;
103 std::unique_ptr<base::Value> options = 104 std::unique_ptr<base::Value> options =
104 base::JSONReader::Read(experimental_options); 105 base::JSONReader::Read(experimental_options);
105 106
106 if (!options) { 107 if (!options) {
107 DCHECK(false) << "Parsing experimental options failed: " 108 DCHECK(false) << "Parsing experimental options failed: "
108 << experimental_options; 109 << experimental_options;
109 return; 110 return nullptr;
110 } 111 }
111 112
112 std::unique_ptr<base::DictionaryValue> dict = 113 std::unique_ptr<base::DictionaryValue> dict =
113 base::DictionaryValue::From(std::move(options)); 114 base::DictionaryValue::From(std::move(options));
114 115
115 if (!dict) { 116 if (!dict) {
116 DCHECK(false) << "Experimental options string is not a dictionary: " 117 DCHECK(false) << "Experimental options string is not a dictionary: "
117 << experimental_options; 118 << experimental_options;
118 return; 119 return nullptr;
119 }
120
121 const base::DictionaryValue* quic_args = nullptr;
122 if (dict->GetDictionary(kQuicFieldTrialName, &quic_args)) {
123 std::string quic_connection_options;
124 if (quic_args->GetString(kQuicConnectionOptions,
125 &quic_connection_options)) {
126 context_builder->set_quic_connection_options(
127 net::ParseQuicConnectionOptions(quic_connection_options));
128 }
129
130 // TODO(rtenneti): Delete this option after apps stop using it.
131 // Added this for backward compatibility.
132 bool quic_store_server_configs_in_properties = false;
133 if (quic_args->GetBoolean(kQuicStoreServerConfigsInProperties,
134 &quic_store_server_configs_in_properties)) {
135 context_builder->set_quic_max_server_configs_stored_in_properties(
136 net::kMaxQuicServersToPersist);
137 }
138
139 int quic_max_server_configs_stored_in_properties = 0;
140 if (quic_args->GetInteger(kQuicMaxServerConfigsStoredInProperties,
141 &quic_max_server_configs_stored_in_properties)) {
142 context_builder->set_quic_max_server_configs_stored_in_properties(
143 static_cast<size_t>(quic_max_server_configs_stored_in_properties));
144 }
145
146 bool quic_delay_tcp_race = false;
147 if (quic_args->GetBoolean(kQuicDelayTcpRace, &quic_delay_tcp_race)) {
148 context_builder->set_quic_delay_tcp_race(quic_delay_tcp_race);
149 }
150
151 int quic_idle_connection_timeout_seconds = 0;
152 if (quic_args->GetInteger(kQuicIdleConnectionTimeoutSeconds,
153 &quic_idle_connection_timeout_seconds)) {
154 context_builder->set_quic_idle_connection_timeout_seconds(
155 quic_idle_connection_timeout_seconds);
156 }
157
158 std::string quic_host_whitelist;
159 if (quic_args->GetString(kQuicHostWhitelist, &quic_host_whitelist)) {
160 std::unordered_set<std::string> hosts;
161 for (const std::string& host :
162 base::SplitString(quic_host_whitelist, ",", base::TRIM_WHITESPACE,
163 base::SPLIT_WANT_ALL)) {
164 hosts.insert(host);
165 }
166 context_builder->set_quic_host_whitelist(hosts);
167 }
168
169 bool quic_close_sessions_on_ip_change = false;
170 if (quic_args->GetBoolean(kQuicCloseSessionsOnIpChange,
171 &quic_close_sessions_on_ip_change)) {
172 context_builder->set_quic_close_sessions_on_ip_change(
173 quic_close_sessions_on_ip_change);
174 }
175
176 bool quic_migrate_sessions_on_network_change = false;
177 if (quic_args->GetBoolean(kQuicMigrateSessionsOnNetworkChange,
178 &quic_migrate_sessions_on_network_change)) {
179 context_builder->set_quic_migrate_sessions_on_network_change(
180 quic_migrate_sessions_on_network_change);
181 }
182
183 bool quic_prefer_aes = false;
184 if (quic_args->GetBoolean(kQuicPreferAes, &quic_prefer_aes)) {
185 context_builder->set_quic_prefer_aes(quic_prefer_aes);
186 }
187
188 std::string quic_user_agent_id;
189 if (quic_args->GetString(kQuicUserAgentId, &quic_user_agent_id)) {
190 context_builder->set_quic_user_agent_id(quic_user_agent_id);
191 }
192
193 bool quic_migrate_sessions_early = false;
194 if (quic_args->GetBoolean(kQuicMigrateSessionsEarly,
195 &quic_migrate_sessions_early)) {
196 context_builder->set_quic_migrate_sessions_early(
197 quic_migrate_sessions_early);
198 }
199
200 bool quic_disable_bidirectional_streams = false;
201 if (quic_args->GetBoolean(kQuicDisableBidirectionalStreams,
202 &quic_disable_bidirectional_streams)) {
203 context_builder->set_quic_disable_bidirectional_streams(
204 quic_disable_bidirectional_streams);
205 }
206
207 bool quic_race_cert_verification = false;
208 if (quic_args->GetBoolean(kQuicRaceCertVerification,
209 &quic_race_cert_verification)) {
210 context_builder->set_quic_race_cert_verification(
211 quic_race_cert_verification);
212 }
213 } 120 }
214 121
215 bool async_dns_enable = false; 122 bool async_dns_enable = false;
216 bool stale_dns_enable = false; 123 bool stale_dns_enable = false;
217 bool host_resolver_rules_enable = false; 124 bool host_resolver_rules_enable = false;
218 bool disable_ipv6 = false; 125 bool disable_ipv6 = false;
219 StaleHostResolver::StaleOptions stale_dns_options; 126 StaleHostResolver::StaleOptions stale_dns_options;
220 std::string host_resolver_rules_string; 127 std::string host_resolver_rules_string;
128 for (base::DictionaryValue::Iterator it(*dict.get()); !it.IsAtEnd();
129 it.Advance()) {
130 if (it.key() == kQuicFieldTrialName) {
131 const base::DictionaryValue* quic_args = nullptr;
132 if (!it.value().GetAsDictionary(&quic_args)) {
133 LOG(ERROR) << "Quic config params \"" << it.value()
134 << "\" is not a dictionary value";
135 dict->Remove(it.key(), nullptr);
136 continue;
137 }
138 std::string quic_connection_options;
139 if (quic_args->GetString(kQuicConnectionOptions,
140 &quic_connection_options)) {
141 context_builder->set_quic_connection_options(
142 net::ParseQuicConnectionOptions(quic_connection_options));
143 }
221 144
222 const base::DictionaryValue* async_dns_args = nullptr; 145 // TODO(rtenneti): Delete this option after apps stop using it.
223 if (dict->GetDictionary(kAsyncDnsFieldTrialName, &async_dns_args)) 146 // Added this for backward compatibility.
224 async_dns_args->GetBoolean(kAsyncDnsEnable, &async_dns_enable); 147 bool quic_store_server_configs_in_properties = false;
148 if (quic_args->GetBoolean(kQuicStoreServerConfigsInProperties,
149 &quic_store_server_configs_in_properties)) {
150 context_builder->set_quic_max_server_configs_stored_in_properties(
151 net::kMaxQuicServersToPersist);
152 }
225 153
226 const base::DictionaryValue* stale_dns_args = nullptr; 154 int quic_max_server_configs_stored_in_properties = 0;
227 if (dict->GetDictionary(kStaleDnsFieldTrialName, &stale_dns_args)) { 155 if (quic_args->GetInteger(
228 if (stale_dns_args->GetBoolean(kStaleDnsEnable, &stale_dns_enable) && 156 kQuicMaxServerConfigsStoredInProperties,
229 stale_dns_enable) { 157 &quic_max_server_configs_stored_in_properties)) {
230 int delay; 158 context_builder->set_quic_max_server_configs_stored_in_properties(
231 if (stale_dns_args->GetInteger(kStaleDnsDelayMs, &delay)) 159 static_cast<size_t>(quic_max_server_configs_stored_in_properties));
232 stale_dns_options.delay = base::TimeDelta::FromMilliseconds(delay);
233 int max_expired_time_ms;
234 if (stale_dns_args->GetInteger(kStaleDnsMaxExpiredTimeMs,
235 &max_expired_time_ms)) {
236 stale_dns_options.max_expired_time =
237 base::TimeDelta::FromMilliseconds(max_expired_time_ms);
238 } 160 }
239 int max_stale_uses; 161
240 if (stale_dns_args->GetInteger(kStaleDnsMaxStaleUses, &max_stale_uses)) 162 bool quic_delay_tcp_race = false;
241 stale_dns_options.max_stale_uses = max_stale_uses; 163 if (quic_args->GetBoolean(kQuicDelayTcpRace, &quic_delay_tcp_race)) {
242 bool allow_other_network; 164 context_builder->set_quic_delay_tcp_race(quic_delay_tcp_race);
243 if (stale_dns_args->GetBoolean(kStaleDnsAllowOtherNetwork,
244 &allow_other_network)) {
245 stale_dns_options.allow_other_network = allow_other_network;
246 } 165 }
166
167 int quic_idle_connection_timeout_seconds = 0;
168 if (quic_args->GetInteger(kQuicIdleConnectionTimeoutSeconds,
169 &quic_idle_connection_timeout_seconds)) {
170 context_builder->set_quic_idle_connection_timeout_seconds(
171 quic_idle_connection_timeout_seconds);
172 }
173
174 std::string quic_host_whitelist;
175 if (quic_args->GetString(kQuicHostWhitelist, &quic_host_whitelist)) {
176 std::unordered_set<std::string> hosts;
177 for (const std::string& host :
178 base::SplitString(quic_host_whitelist, ",", base::TRIM_WHITESPACE,
179 base::SPLIT_WANT_ALL)) {
180 hosts.insert(host);
181 }
182 context_builder->set_quic_host_whitelist(hosts);
183 }
184
185 bool quic_close_sessions_on_ip_change = false;
186 if (quic_args->GetBoolean(kQuicCloseSessionsOnIpChange,
187 &quic_close_sessions_on_ip_change)) {
188 context_builder->set_quic_close_sessions_on_ip_change(
189 quic_close_sessions_on_ip_change);
190 }
191
192 bool quic_migrate_sessions_on_network_change = false;
193 if (quic_args->GetBoolean(kQuicMigrateSessionsOnNetworkChange,
194 &quic_migrate_sessions_on_network_change)) {
195 context_builder->set_quic_migrate_sessions_on_network_change(
196 quic_migrate_sessions_on_network_change);
197 }
198
199 bool quic_prefer_aes = false;
200 if (quic_args->GetBoolean(kQuicPreferAes, &quic_prefer_aes)) {
201 context_builder->set_quic_prefer_aes(quic_prefer_aes);
202 }
203
204 std::string quic_user_agent_id;
205 if (quic_args->GetString(kQuicUserAgentId, &quic_user_agent_id)) {
206 context_builder->set_quic_user_agent_id(quic_user_agent_id);
207 }
208
209 bool quic_migrate_sessions_early = false;
210 if (quic_args->GetBoolean(kQuicMigrateSessionsEarly,
211 &quic_migrate_sessions_early)) {
212 context_builder->set_quic_migrate_sessions_early(
213 quic_migrate_sessions_early);
214 }
215
216 bool quic_disable_bidirectional_streams = false;
217 if (quic_args->GetBoolean(kQuicDisableBidirectionalStreams,
218 &quic_disable_bidirectional_streams)) {
219 context_builder->set_quic_disable_bidirectional_streams(
220 quic_disable_bidirectional_streams);
221 }
222
223 bool quic_race_cert_verification = false;
224 if (quic_args->GetBoolean(kQuicRaceCertVerification,
225 &quic_race_cert_verification)) {
226 context_builder->set_quic_race_cert_verification(
227 quic_race_cert_verification);
228 }
229 } else if (it.key() == kAsyncDnsFieldTrialName) {
230 const base::DictionaryValue* async_dns_args = nullptr;
231 if (!it.value().GetAsDictionary(&async_dns_args)) {
232 LOG(ERROR) << "\"" << it.key() << "\" config params \"" << it.value()
233 << "\" is not a dictionary value";
234 dict->Remove(it.key(), nullptr);
235 continue;
236 }
237 async_dns_args->GetBoolean(kAsyncDnsEnable, &async_dns_enable);
238 } else if (it.key() == kStaleDnsFieldTrialName) {
239 const base::DictionaryValue* stale_dns_args = nullptr;
240 if (!it.value().GetAsDictionary(&stale_dns_args)) {
241 LOG(ERROR) << "\"" << it.key() << "\" config params \"" << it.value()
242 << "\" is not a dictionary value";
243 dict->Remove(it.key(), nullptr);
244 continue;
245 }
246 if (stale_dns_args->GetBoolean(kStaleDnsEnable, &stale_dns_enable) &&
247 stale_dns_enable) {
248 int delay;
249 if (stale_dns_args->GetInteger(kStaleDnsDelayMs, &delay))
250 stale_dns_options.delay = base::TimeDelta::FromMilliseconds(delay);
251 int max_expired_time_ms;
252 if (stale_dns_args->GetInteger(kStaleDnsMaxExpiredTimeMs,
253 &max_expired_time_ms)) {
254 stale_dns_options.max_expired_time =
255 base::TimeDelta::FromMilliseconds(max_expired_time_ms);
256 }
257 int max_stale_uses;
258 if (stale_dns_args->GetInteger(kStaleDnsMaxStaleUses, &max_stale_uses))
259 stale_dns_options.max_stale_uses = max_stale_uses;
260 bool allow_other_network;
261 if (stale_dns_args->GetBoolean(kStaleDnsAllowOtherNetwork,
262 &allow_other_network)) {
263 stale_dns_options.allow_other_network = allow_other_network;
264 }
265 }
266 } else if (it.key() == kHostResolverRulesFieldTrialName) {
267 const base::DictionaryValue* host_resolver_rules_args = nullptr;
268 if (!it.value().GetAsDictionary(&host_resolver_rules_args)) {
269 LOG(ERROR) << "\"" << it.key() << "\" config params \"" << it.value()
270 << "\" is not a dictionary value";
271 dict->Remove(it.key(), nullptr);
272 continue;
273 }
274 host_resolver_rules_enable = host_resolver_rules_args->GetString(
275 kHostResolverRules, &host_resolver_rules_string);
276 } else if (it.key() == kDisableIPv6) {
277 if (!it.value().GetAsBoolean(&disable_ipv6)) {
278 LOG(ERROR) << "\"" << it.key() << "\" config params \"" << it.value()
279 << "\" is not a bool";
280 dict->Remove(it.key(), nullptr);
281 continue;
282 }
283 } else if (it.key() == kSSLKeyLogFile) {
284 std::string ssl_key_log_file_string;
285 if (it.value().GetAsString(&ssl_key_log_file_string)) {
286 DCHECK(file_task_runner);
287 base::FilePath ssl_key_log_file(ssl_key_log_file_string);
288 if (!ssl_key_log_file.empty() && file_task_runner) {
289 // SetSSLKeyLogFile is only safe to call before any SSLClientSockets
290 // are created. This should not be used if there are multiple
291 // CronetEngine.
292 // TODO(xunjieli): Expose this as a stable API after crbug.com/458365
293 // is resolved.
294 net::SSLClientSocket::SetSSLKeyLogFile(ssl_key_log_file,
295 file_task_runner);
296 }
297 }
298 } else {
299 LOG(ERROR) << "Unrecognized Cronet experimental option \"" << it.key()
kapishnikov 2017/03/14 14:37:09 Should we change the error to warning? It could be
xunjieli 2017/03/14 19:03:06 This doesn't introduce crash. I think this one is
kapishnikov 2017/03/14 22:39:07 There can be a scenario when the implementation is
xunjieli 2017/03/14 23:10:46 Done.
300 << "\" with params \"" << it.value();
301 dict->Remove(it.key(), nullptr);
247 } 302 }
248 } 303 }
249
250 const base::DictionaryValue* host_resolver_rules_args = nullptr;
251 if (dict->GetDictionary(kHostResolverRulesFieldTrialName,
252 &host_resolver_rules_args)) {
253 host_resolver_rules_enable = host_resolver_rules_args->GetString(
254 kHostResolverRules, &host_resolver_rules_string);
255 }
256
257 dict->GetBoolean(kDisableIPv6, &disable_ipv6);
258
259 if (async_dns_enable || stale_dns_enable || host_resolver_rules_enable || 304 if (async_dns_enable || stale_dns_enable || host_resolver_rules_enable ||
260 disable_ipv6) { 305 disable_ipv6) {
261 if (net_log == nullptr) { 306 CHECK(net_log) << "All DNS-related experiments require NetLog.";
262 CHECK(false) << "All DNS-related experiments require NetLog.";
263 }
264 std::unique_ptr<net::HostResolver> host_resolver; 307 std::unique_ptr<net::HostResolver> host_resolver;
265 if (stale_dns_enable) { 308 if (stale_dns_enable) {
266 DCHECK(!disable_ipv6); 309 DCHECK(!disable_ipv6);
267 host_resolver.reset(new StaleHostResolver( 310 host_resolver.reset(new StaleHostResolver(
268 net::HostResolver::CreateDefaultResolverImpl(net_log), 311 net::HostResolver::CreateDefaultResolverImpl(net_log),
269 stale_dns_options)); 312 stale_dns_options));
270 } else { 313 } else {
271 host_resolver = net::HostResolver::CreateDefaultResolver(net_log); 314 host_resolver = net::HostResolver::CreateDefaultResolver(net_log);
272 } 315 }
273 if (disable_ipv6) 316 if (disable_ipv6)
274 host_resolver->SetDefaultAddressFamily(net::ADDRESS_FAMILY_IPV4); 317 host_resolver->SetDefaultAddressFamily(net::ADDRESS_FAMILY_IPV4);
275 if (async_dns_enable) 318 if (async_dns_enable)
276 host_resolver->SetDnsClientEnabled(true); 319 host_resolver->SetDnsClientEnabled(true);
277 if (host_resolver_rules_enable) { 320 if (host_resolver_rules_enable) {
278 std::unique_ptr<net::MappedHostResolver> remapped_resolver( 321 std::unique_ptr<net::MappedHostResolver> remapped_resolver(
279 new net::MappedHostResolver(std::move(host_resolver))); 322 new net::MappedHostResolver(std::move(host_resolver)));
280 remapped_resolver->SetRulesFromString(host_resolver_rules_string); 323 remapped_resolver->SetRulesFromString(host_resolver_rules_string);
281 host_resolver = std::move(remapped_resolver); 324 host_resolver = std::move(remapped_resolver);
282 } 325 }
283 context_builder->set_host_resolver(std::move(host_resolver)); 326 context_builder->set_host_resolver(std::move(host_resolver));
284 } 327 }
285 328 return dict;
286 std::string ssl_key_log_file_string;
287 if (dict->GetString(kSSLKeyLogFile, &ssl_key_log_file_string)) {
288 DCHECK(file_task_runner);
289 base::FilePath ssl_key_log_file(ssl_key_log_file_string);
290 if (!ssl_key_log_file.empty() && file_task_runner) {
291 // SetSSLKeyLogFile is only safe to call before any SSLClientSockets are
292 // created. This should not be used if there are multiple CronetEngine.
293 // TODO(xunjieli): Expose this as a stable API after crbug.com/458365 is
294 // resolved.
295 net::SSLClientSocket::SetSSLKeyLogFile(ssl_key_log_file,
296 file_task_runner);
297 }
298 }
299 } 329 }
300 330
301 } // namespace 331 } // namespace
302 332
303 URLRequestContextConfig::QuicHint::QuicHint(const std::string& host, 333 URLRequestContextConfig::QuicHint::QuicHint(const std::string& host,
304 int port, 334 int port,
305 int alternate_port) 335 int alternate_port)
306 : host(host), port(port), alternate_port(alternate_port) {} 336 : host(host), port(port), alternate_port(alternate_port) {}
307 337
308 URLRequestContextConfig::QuicHint::~QuicHint() {} 338 URLRequestContextConfig::QuicHint::~QuicHint() {}
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 context_builder->EnableHttpCache(cache_params); 410 context_builder->EnableHttpCache(cache_params);
381 } else { 411 } else {
382 context_builder->DisableHttpCache(); 412 context_builder->DisableHttpCache();
383 } 413 }
384 context_builder->set_user_agent(user_agent); 414 context_builder->set_user_agent(user_agent);
385 context_builder->SetSpdyAndQuicEnabled(enable_spdy, enable_quic); 415 context_builder->SetSpdyAndQuicEnabled(enable_spdy, enable_quic);
386 context_builder->set_sdch_enabled(enable_sdch); 416 context_builder->set_sdch_enabled(enable_sdch);
387 if (enable_quic) 417 if (enable_quic)
388 context_builder->set_quic_user_agent_id(quic_user_agent_id); 418 context_builder->set_quic_user_agent_id(quic_user_agent_id);
389 419
390 ParseAndSetExperimentalOptions(experimental_options, context_builder, net_log, 420 effective_experimental_options = ParseAndSetExperimentalOptions(
391 file_task_runner); 421 experimental_options, context_builder, net_log, file_task_runner);
392 422
393 std::unique_ptr<net::CertVerifier> cert_verifier; 423 std::unique_ptr<net::CertVerifier> cert_verifier;
394 if (mock_cert_verifier) { 424 if (mock_cert_verifier) {
395 // Because |context_builder| expects CachingCertVerifier, wrap 425 // Because |context_builder| expects CachingCertVerifier, wrap
396 // |mock_cert_verifier| into a CachingCertVerifier. 426 // |mock_cert_verifier| into a CachingCertVerifier.
397 cert_verifier = base::MakeUnique<net::CachingCertVerifier>( 427 cert_verifier = base::MakeUnique<net::CachingCertVerifier>(
398 std::move(mock_cert_verifier)); 428 std::move(mock_cert_verifier));
399 } else { 429 } else {
400 // net::CertVerifier::CreateDefault() returns a CachingCertVerifier. 430 // net::CertVerifier::CreateDefault() returns a CachingCertVerifier.
401 cert_verifier = net::CertVerifier::CreateDefault(); 431 cert_verifier = net::CertVerifier::CreateDefault();
(...skipping 11 matching lines...) Expand all
413 enable_quic, quic_user_agent_id, enable_spdy, enable_sdch, http_cache, 443 enable_quic, quic_user_agent_id, enable_spdy, enable_sdch, http_cache,
414 http_cache_max_size, load_disable_cache, storage_path, user_agent, 444 http_cache_max_size, load_disable_cache, storage_path, user_agent,
415 experimental_options, data_reduction_proxy_key, 445 experimental_options, data_reduction_proxy_key,
416 data_reduction_primary_proxy, data_reduction_fallback_proxy, 446 data_reduction_primary_proxy, data_reduction_fallback_proxy,
417 data_reduction_secure_proxy_check_url, std::move(mock_cert_verifier), 447 data_reduction_secure_proxy_check_url, std::move(mock_cert_verifier),
418 enable_network_quality_estimator, 448 enable_network_quality_estimator,
419 bypass_public_key_pinning_for_local_trust_anchors, cert_verifier_data); 449 bypass_public_key_pinning_for_local_trust_anchors, cert_verifier_data);
420 } 450 }
421 451
422 } // namespace cronet 452 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698