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

Side by Side Diff: net/url_request/url_request_context_builder.cc

Issue 1665503002: [Cronet] Expose quic_user_agent_id and quic_prefer_aes config options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 4 years, 10 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 "net/url_request/url_request_context_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 testing_fixed_http_port(0), 180 testing_fixed_http_port(0),
181 testing_fixed_https_port(0), 181 testing_fixed_https_port(0),
182 enable_spdy31(true), 182 enable_spdy31(true),
183 enable_http2(true), 183 enable_http2(true),
184 parse_alternative_services(true), 184 parse_alternative_services(true),
185 enable_alternative_service_with_different_host(true), 185 enable_alternative_service_with_different_host(true),
186 enable_quic(false), 186 enable_quic(false),
187 quic_max_server_configs_stored_in_properties(0), 187 quic_max_server_configs_stored_in_properties(0),
188 quic_delay_tcp_race(false), 188 quic_delay_tcp_race(false),
189 quic_max_number_of_lossy_connections(0), 189 quic_max_number_of_lossy_connections(0),
190 quic_prefer_aes(false),
190 quic_packet_loss_threshold(1.0f), 191 quic_packet_loss_threshold(1.0f),
191 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds) {} 192 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds) {}
192 193
193 URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams() 194 URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams()
194 {} 195 {}
195 196
196 URLRequestContextBuilder::URLRequestContextBuilder() 197 URLRequestContextBuilder::URLRequestContextBuilder()
197 : data_enabled_(false), 198 : data_enabled_(false),
198 #if !defined(DISABLE_FILE_SUPPORT) 199 #if !defined(DISABLE_FILE_SUPPORT)
199 file_enabled_(false), 200 file_enabled_(false),
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 network_session_params.quic_max_number_of_lossy_connections = 407 network_session_params.quic_max_number_of_lossy_connections =
407 http_network_session_params_.quic_max_number_of_lossy_connections; 408 http_network_session_params_.quic_max_number_of_lossy_connections;
408 network_session_params.quic_packet_loss_threshold = 409 network_session_params.quic_packet_loss_threshold =
409 http_network_session_params_.quic_packet_loss_threshold; 410 http_network_session_params_.quic_packet_loss_threshold;
410 network_session_params.quic_idle_connection_timeout_seconds = 411 network_session_params.quic_idle_connection_timeout_seconds =
411 http_network_session_params_.quic_idle_connection_timeout_seconds; 412 http_network_session_params_.quic_idle_connection_timeout_seconds;
412 network_session_params.quic_connection_options = 413 network_session_params.quic_connection_options =
413 http_network_session_params_.quic_connection_options; 414 http_network_session_params_.quic_connection_options;
414 network_session_params.quic_host_whitelist = 415 network_session_params.quic_host_whitelist =
415 http_network_session_params_.quic_host_whitelist; 416 http_network_session_params_.quic_host_whitelist;
417 network_session_params.quic_user_agent_id =
418 http_network_session_params_.quic_user_agent_id;
419 network_session_params.quic_prefer_aes =
420 http_network_session_params_.quic_prefer_aes;
416 421
417 storage->set_http_network_session( 422 storage->set_http_network_session(
418 make_scoped_ptr(new HttpNetworkSession(network_session_params))); 423 make_scoped_ptr(new HttpNetworkSession(network_session_params)));
419 424
420 scoped_ptr<HttpTransactionFactory> http_transaction_factory; 425 scoped_ptr<HttpTransactionFactory> http_transaction_factory;
421 if (http_cache_enabled_) { 426 if (http_cache_enabled_) {
422 scoped_ptr<HttpCache::BackendFactory> http_cache_backend; 427 scoped_ptr<HttpCache::BackendFactory> http_cache_backend;
423 if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) { 428 if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) {
424 BackendType backend_type = 429 BackendType backend_type =
425 http_cache_params_.type == HttpCacheParams::DISK 430 http_cache_params_.type == HttpCacheParams::DISK
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 480 }
476 url_request_interceptors_.clear(); 481 url_request_interceptors_.clear();
477 } 482 }
478 storage->set_job_factory(std::move(top_job_factory)); 483 storage->set_job_factory(std::move(top_job_factory));
479 // TODO(willchan): Support sdch. 484 // TODO(willchan): Support sdch.
480 485
481 return std::move(context); 486 return std::move(context);
482 } 487 }
483 488
484 } // namespace net 489 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698