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

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

Issue 1389213003: [Cronet] Use Https for Quic Test Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ryancl
Patch Set: Address Misha's comments Created 5 years, 2 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 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 false))); 344 false)));
345 } 345 }
346 346
347 if (http_server_properties_) { 347 if (http_server_properties_) {
348 storage->set_http_server_properties(http_server_properties_.Pass()); 348 storage->set_http_server_properties(http_server_properties_.Pass());
349 } else { 349 } else {
350 storage->set_http_server_properties( 350 storage->set_http_server_properties(
351 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); 351 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
352 } 352 }
353 353
354 storage->set_cert_verifier(CertVerifier::CreateDefault()); 354 storage->set_cert_verifier(CertVerifier::CreateDefault());
pauljensen 2015/10/15 19:13:07 Can I recommend a simplification: 1. make UrlReque
mmenke 2015/10/15 19:40:41 I think 385-386 need to be changed to take the cer
pauljensen 2015/10/16 11:17:22 I believe this already happens on line 367; this i
mmenke 2015/10/16 13:25:35 I'm not seeing where storage's cert_verified is se
pauljensen 2015/10/16 13:30:56 (Not sure if you meant to leave this line in, or y
mmenke 2015/10/16 18:21:39 I forgot I wrote that line, when I suddenly realiz
xunjieli 2015/10/19 01:40:43 Done. That's really neat. Thanks!
355 355
356 if (throttling_enabled_) { 356 if (throttling_enabled_) {
357 storage->set_throttler_manager( 357 storage->set_throttler_manager(
358 make_scoped_ptr(new URLRequestThrottlerManager())); 358 make_scoped_ptr(new URLRequestThrottlerManager()));
359 } 359 }
360 360
361 if (backoff_enabled_) { 361 if (backoff_enabled_) {
362 storage->set_backoff_manager( 362 storage->set_backoff_manager(
363 make_scoped_ptr(new URLRequestBackoffManager())); 363 make_scoped_ptr(new URLRequestBackoffManager()));
364 } 364 }
(...skipping 10 matching lines...) Expand all
375 network_session_params.testing_fixed_https_port = 375 network_session_params.testing_fixed_https_port =
376 http_network_session_params_.testing_fixed_https_port; 376 http_network_session_params_.testing_fixed_https_port;
377 network_session_params.use_alternative_services = 377 network_session_params.use_alternative_services =
378 http_network_session_params_.use_alternative_services; 378 http_network_session_params_.use_alternative_services;
379 network_session_params.trusted_spdy_proxy = 379 network_session_params.trusted_spdy_proxy =
380 http_network_session_params_.trusted_spdy_proxy; 380 http_network_session_params_.trusted_spdy_proxy;
381 network_session_params.next_protos = http_network_session_params_.next_protos; 381 network_session_params.next_protos = http_network_session_params_.next_protos;
382 network_session_params.enable_quic = http_network_session_params_.enable_quic; 382 network_session_params.enable_quic = http_network_session_params_.enable_quic;
383 network_session_params.quic_connection_options = 383 network_session_params.quic_connection_options =
384 http_network_session_params_.quic_connection_options; 384 http_network_session_params_.quic_connection_options;
385 network_session_params.cert_verifier =
386 http_network_session_params_.cert_verifier;
385 387
386 scoped_ptr<HttpTransactionFactory> http_transaction_factory; 388 scoped_ptr<HttpTransactionFactory> http_transaction_factory;
387 if (http_cache_enabled_) { 389 if (http_cache_enabled_) {
388 HttpCache::BackendFactory* http_cache_backend = NULL; 390 HttpCache::BackendFactory* http_cache_backend = NULL;
389 if (http_cache_params_.type == HttpCacheParams::DISK) { 391 if (http_cache_params_.type == HttpCacheParams::DISK) {
390 http_cache_backend = new HttpCache::DefaultBackend( 392 http_cache_backend = new HttpCache::DefaultBackend(
391 DISK_CACHE, CACHE_BACKEND_DEFAULT, http_cache_params_.path, 393 DISK_CACHE, CACHE_BACKEND_DEFAULT, http_cache_params_.path,
392 http_cache_params_.max_size, context->GetFileTaskRunner()); 394 http_cache_params_.max_size, context->GetFileTaskRunner());
393 } else { 395 } else {
394 http_cache_backend = 396 http_cache_backend =
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 442 }
441 url_request_interceptors_.weak_clear(); 443 url_request_interceptors_.weak_clear();
442 } 444 }
443 storage->set_job_factory(top_job_factory.Pass()); 445 storage->set_job_factory(top_job_factory.Pass());
444 // TODO(willchan): Support sdch. 446 // TODO(willchan): Support sdch.
445 447
446 return context.Pass(); 448 return context.Pass();
447 } 449 }
448 450
449 } // namespace net 451 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698