| OLD | NEW |
| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 HttpCacheType http_cache, | 242 HttpCacheType http_cache, |
| 243 int http_cache_max_size, | 243 int http_cache_max_size, |
| 244 bool load_disable_cache, | 244 bool load_disable_cache, |
| 245 const std::string& storage_path, | 245 const std::string& storage_path, |
| 246 const std::string& user_agent, | 246 const std::string& user_agent, |
| 247 const std::string& experimental_options, | 247 const std::string& experimental_options, |
| 248 const std::string& data_reduction_proxy_key, | 248 const std::string& data_reduction_proxy_key, |
| 249 const std::string& data_reduction_primary_proxy, | 249 const std::string& data_reduction_primary_proxy, |
| 250 const std::string& data_reduction_fallback_proxy, | 250 const std::string& data_reduction_fallback_proxy, |
| 251 const std::string& data_reduction_secure_proxy_check_url, | 251 const std::string& data_reduction_secure_proxy_check_url, |
| 252 std::unique_ptr<net::CertVerifier> mock_cert_verifier) | 252 std::unique_ptr<net::CertVerifier> mock_cert_verifier, |
| 253 bool enable_network_quality_estimator) |
| 253 : enable_quic(enable_quic), | 254 : enable_quic(enable_quic), |
| 254 quic_user_agent_id(quic_user_agent_id), | 255 quic_user_agent_id(quic_user_agent_id), |
| 255 enable_spdy(enable_spdy), | 256 enable_spdy(enable_spdy), |
| 256 enable_sdch(enable_sdch), | 257 enable_sdch(enable_sdch), |
| 257 http_cache(http_cache), | 258 http_cache(http_cache), |
| 258 http_cache_max_size(http_cache_max_size), | 259 http_cache_max_size(http_cache_max_size), |
| 259 load_disable_cache(load_disable_cache), | 260 load_disable_cache(load_disable_cache), |
| 260 storage_path(storage_path), | 261 storage_path(storage_path), |
| 261 user_agent(user_agent), | 262 user_agent(user_agent), |
| 262 experimental_options(experimental_options), | 263 experimental_options(experimental_options), |
| 263 data_reduction_proxy_key(data_reduction_proxy_key), | 264 data_reduction_proxy_key(data_reduction_proxy_key), |
| 264 data_reduction_primary_proxy(data_reduction_primary_proxy), | 265 data_reduction_primary_proxy(data_reduction_primary_proxy), |
| 265 data_reduction_fallback_proxy(data_reduction_fallback_proxy), | 266 data_reduction_fallback_proxy(data_reduction_fallback_proxy), |
| 266 data_reduction_secure_proxy_check_url( | 267 data_reduction_secure_proxy_check_url( |
| 267 data_reduction_secure_proxy_check_url), | 268 data_reduction_secure_proxy_check_url), |
| 268 mock_cert_verifier(std::move(mock_cert_verifier)) {} | 269 mock_cert_verifier(std::move(mock_cert_verifier)), |
| 270 enable_network_quality_estimator(enable_network_quality_estimator) {} |
| 269 | 271 |
| 270 URLRequestContextConfig::~URLRequestContextConfig() {} | 272 URLRequestContextConfig::~URLRequestContextConfig() {} |
| 271 | 273 |
| 272 void URLRequestContextConfig::ConfigureURLRequestContextBuilder( | 274 void URLRequestContextConfig::ConfigureURLRequestContextBuilder( |
| 273 net::URLRequestContextBuilder* context_builder, | 275 net::URLRequestContextBuilder* context_builder, |
| 274 net::NetLog* net_log, | 276 net::NetLog* net_log, |
| 275 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) { | 277 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) { |
| 276 std::string config_cache; | 278 std::string config_cache; |
| 277 if (http_cache != DISABLED) { | 279 if (http_cache != DISABLED) { |
| 278 net::URLRequestContextBuilder::HttpCacheParams cache_params; | 280 net::URLRequestContextBuilder::HttpCacheParams cache_params; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 298 | 300 |
| 299 ParseAndSetExperimentalOptions(experimental_options, context_builder, net_log, | 301 ParseAndSetExperimentalOptions(experimental_options, context_builder, net_log, |
| 300 file_task_runner); | 302 file_task_runner); |
| 301 | 303 |
| 302 if (mock_cert_verifier) | 304 if (mock_cert_verifier) |
| 303 context_builder->SetCertVerifier(std::move(mock_cert_verifier)); | 305 context_builder->SetCertVerifier(std::move(mock_cert_verifier)); |
| 304 // TODO(mef): Use |config| to set cookies. | 306 // TODO(mef): Use |config| to set cookies. |
| 305 } | 307 } |
| 306 | 308 |
| 307 } // namespace cronet | 309 } // namespace cronet |
| OLD | NEW |