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

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

Issue 2052363002: Enable public key pinning of local trust anchors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed CronetPerfTestActivity test Created 4 years, 5 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool enable_network_quality_estimator,
254 bool bypass_public_key_pinning_for_local_trust_anchors)
254 : enable_quic(enable_quic), 255 : enable_quic(enable_quic),
255 quic_user_agent_id(quic_user_agent_id), 256 quic_user_agent_id(quic_user_agent_id),
256 enable_spdy(enable_spdy), 257 enable_spdy(enable_spdy),
257 enable_sdch(enable_sdch), 258 enable_sdch(enable_sdch),
258 http_cache(http_cache), 259 http_cache(http_cache),
259 http_cache_max_size(http_cache_max_size), 260 http_cache_max_size(http_cache_max_size),
260 load_disable_cache(load_disable_cache), 261 load_disable_cache(load_disable_cache),
261 storage_path(storage_path), 262 storage_path(storage_path),
262 user_agent(user_agent), 263 user_agent(user_agent),
263 experimental_options(experimental_options), 264 experimental_options(experimental_options),
264 data_reduction_proxy_key(data_reduction_proxy_key), 265 data_reduction_proxy_key(data_reduction_proxy_key),
265 data_reduction_primary_proxy(data_reduction_primary_proxy), 266 data_reduction_primary_proxy(data_reduction_primary_proxy),
266 data_reduction_fallback_proxy(data_reduction_fallback_proxy), 267 data_reduction_fallback_proxy(data_reduction_fallback_proxy),
267 data_reduction_secure_proxy_check_url( 268 data_reduction_secure_proxy_check_url(
268 data_reduction_secure_proxy_check_url), 269 data_reduction_secure_proxy_check_url),
269 mock_cert_verifier(std::move(mock_cert_verifier)), 270 mock_cert_verifier(std::move(mock_cert_verifier)),
270 enable_network_quality_estimator(enable_network_quality_estimator) {} 271 enable_network_quality_estimator(enable_network_quality_estimator),
272 bypass_public_key_pinning_for_local_trust_anchors(
273 bypass_public_key_pinning_for_local_trust_anchors) {}
271 274
272 URLRequestContextConfig::~URLRequestContextConfig() {} 275 URLRequestContextConfig::~URLRequestContextConfig() {}
273 276
274 void URLRequestContextConfig::ConfigureURLRequestContextBuilder( 277 void URLRequestContextConfig::ConfigureURLRequestContextBuilder(
275 net::URLRequestContextBuilder* context_builder, 278 net::URLRequestContextBuilder* context_builder,
276 net::NetLog* net_log, 279 net::NetLog* net_log,
277 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) { 280 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) {
278 std::string config_cache; 281 std::string config_cache;
279 if (http_cache != DISABLED) { 282 if (http_cache != DISABLED) {
280 net::URLRequestContextBuilder::HttpCacheParams cache_params; 283 net::URLRequestContextBuilder::HttpCacheParams cache_params;
(...skipping 19 matching lines...) Expand all
300 303
301 ParseAndSetExperimentalOptions(experimental_options, context_builder, net_log, 304 ParseAndSetExperimentalOptions(experimental_options, context_builder, net_log,
302 file_task_runner); 305 file_task_runner);
303 306
304 if (mock_cert_verifier) 307 if (mock_cert_verifier)
305 context_builder->SetCertVerifier(std::move(mock_cert_verifier)); 308 context_builder->SetCertVerifier(std::move(mock_cert_verifier));
306 // TODO(mef): Use |config| to set cookies. 309 // TODO(mef): Use |config| to set cookies.
307 } 310 }
308 311
309 } // namespace cronet 312 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config.h ('k') | components/cronet/url_request_context_config_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698