OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/ios_chrome_io_thread.h" | 5 #include "ios/chrome/browser/ios_chrome_io_thread.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "ios/chrome/browser/net/ios_chrome_network_delegate.h" | 38 #include "ios/chrome/browser/net/ios_chrome_network_delegate.h" |
39 #include "ios/chrome/browser/net/proxy_service_factory.h" | 39 #include "ios/chrome/browser/net/proxy_service_factory.h" |
40 #include "ios/chrome/common/channel_info.h" | 40 #include "ios/chrome/common/channel_info.h" |
41 #include "ios/web/public/user_agent.h" | 41 #include "ios/web/public/user_agent.h" |
42 #include "ios/web/public/web_client.h" | 42 #include "ios/web/public/web_client.h" |
43 #include "ios/web/public/web_thread.h" | 43 #include "ios/web/public/web_thread.h" |
44 #include "net/base/external_estimate_provider.h" | 44 #include "net/base/external_estimate_provider.h" |
45 #include "net/base/net_util.h" | 45 #include "net/base/net_util.h" |
46 #include "net/base/network_quality_estimator.h" | 46 #include "net/base/network_quality_estimator.h" |
47 #include "net/base/sdch_manager.h" | 47 #include "net/base/sdch_manager.h" |
48 #include "net/cert/cert_policy_enforcer.h" | |
49 #include "net/cert/cert_verifier.h" | 48 #include "net/cert/cert_verifier.h" |
50 #include "net/cert/cert_verify_proc.h" | 49 #include "net/cert/cert_verify_proc.h" |
51 #include "net/cert/ct_known_logs.h" | 50 #include "net/cert/ct_known_logs.h" |
52 #include "net/cert/ct_known_logs_static.h" | 51 #include "net/cert/ct_known_logs_static.h" |
53 #include "net/cert/ct_log_verifier.h" | 52 #include "net/cert/ct_log_verifier.h" |
| 53 #include "net/cert/ct_policy_enforcer.h" |
54 #include "net/cert/ct_verifier.h" | 54 #include "net/cert/ct_verifier.h" |
55 #include "net/cert/multi_log_ct_verifier.h" | 55 #include "net/cert/multi_log_ct_verifier.h" |
56 #include "net/cert/multi_threaded_cert_verifier.h" | 56 #include "net/cert/multi_threaded_cert_verifier.h" |
57 #include "net/cert_net/nss_ocsp.h" | 57 #include "net/cert_net/nss_ocsp.h" |
58 #include "net/cookies/cookie_monster.h" | 58 #include "net/cookies/cookie_monster.h" |
59 #include "net/cookies/cookie_store.h" | 59 #include "net/cookies/cookie_store.h" |
60 #include "net/dns/host_cache.h" | 60 #include "net/dns/host_cache.h" |
61 #include "net/dns/host_resolver.h" | 61 #include "net/dns/host_resolver.h" |
62 #include "net/dns/mapped_host_resolver.h" | 62 #include "net/dns/mapped_host_resolver.h" |
63 #include "net/http/http_auth_filter.h" | 63 #include "net/http/http_auth_filter.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 globals_->transport_security_state.reset(new net::TransportSecurityState()); | 400 globals_->transport_security_state.reset(new net::TransportSecurityState()); |
401 | 401 |
402 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs( | 402 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs( |
403 net::ct::CreateLogVerifiersForKnownLogs()); | 403 net::ct::CreateLogVerifiersForKnownLogs()); |
404 | 404 |
405 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); | 405 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); |
406 globals_->cert_transparency_verifier.reset(ct_verifier); | 406 globals_->cert_transparency_verifier.reset(ct_verifier); |
407 // Add built-in logs | 407 // Add built-in logs |
408 ct_verifier->AddLogs(ct_logs); | 408 ct_verifier->AddLogs(ct_logs); |
409 | 409 |
410 net::CertPolicyEnforcer* policy_enforcer = new net::CertPolicyEnforcer; | 410 net::CTPolicyEnforcer* policy_enforcer = new net::CTPolicyEnforcer; |
411 globals_->cert_policy_enforcer.reset(policy_enforcer); | 411 globals_->ct_policy_enforcer.reset(policy_enforcer); |
412 | 412 |
413 globals_->ssl_config_service = GetSSLConfigService(); | 413 globals_->ssl_config_service = GetSSLConfigService(); |
414 | 414 |
415 CreateDefaultAuthHandlerFactory(); | 415 CreateDefaultAuthHandlerFactory(); |
416 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); | 416 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); |
417 // In-memory cookie store. | 417 // In-memory cookie store. |
418 globals_->system_cookie_store = new net::CookieMonster(nullptr, nullptr); | 418 globals_->system_cookie_store = new net::CookieMonster(nullptr, nullptr); |
419 // In-memory channel ID store. | 419 // In-memory channel ID store. |
420 globals_->system_channel_id_service.reset( | 420 globals_->system_channel_id_service.reset( |
421 new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr), | 421 new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr), |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 void IOSChromeIOThread::InitializeNetworkSessionParams( | 589 void IOSChromeIOThread::InitializeNetworkSessionParams( |
590 net::HttpNetworkSession::Params* params) { | 590 net::HttpNetworkSession::Params* params) { |
591 InitializeNetworkSessionParamsFromGlobals(*globals_, params); | 591 InitializeNetworkSessionParamsFromGlobals(*globals_, params); |
592 } | 592 } |
593 | 593 |
594 void IOSChromeIOThread::InitializeNetworkSessionParamsFromGlobals( | 594 void IOSChromeIOThread::InitializeNetworkSessionParamsFromGlobals( |
595 const IOSChromeIOThread::Globals& globals, | 595 const IOSChromeIOThread::Globals& globals, |
596 net::HttpNetworkSession::Params* params) { | 596 net::HttpNetworkSession::Params* params) { |
597 // The next two properties of the params don't seem to be | 597 // The next two properties of the params don't seem to be |
598 // elements of URLRequestContext, so they must be set here. | 598 // elements of URLRequestContext, so they must be set here. |
599 params->cert_policy_enforcer = globals.cert_policy_enforcer.get(); | 599 params->ct_policy_enforcer = globals.ct_policy_enforcer.get(); |
600 | 600 |
601 params->ignore_certificate_errors = false; | 601 params->ignore_certificate_errors = false; |
602 params->testing_fixed_http_port = globals.testing_fixed_http_port; | 602 params->testing_fixed_http_port = globals.testing_fixed_http_port; |
603 params->testing_fixed_https_port = globals.testing_fixed_https_port; | 603 params->testing_fixed_https_port = globals.testing_fixed_https_port; |
604 globals.enable_tcp_fast_open_for_ssl.CopyToIfSet( | 604 globals.enable_tcp_fast_open_for_ssl.CopyToIfSet( |
605 ¶ms->enable_tcp_fast_open_for_ssl); | 605 ¶ms->enable_tcp_fast_open_for_ssl); |
606 | 606 |
607 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( | 607 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( |
608 ¶ms->spdy_initial_max_concurrent_streams); | 608 ¶ms->spdy_initial_max_concurrent_streams); |
609 globals.enable_spdy_compression.CopyToIfSet(¶ms->enable_spdy_compression); | 609 globals.enable_spdy_compression.CopyToIfSet(¶ms->enable_spdy_compression); |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 | 1010 |
1011 globals->system_http_network_session.reset( | 1011 globals->system_http_network_session.reset( |
1012 new net::HttpNetworkSession(system_params)); | 1012 new net::HttpNetworkSession(system_params)); |
1013 globals->system_http_transaction_factory.reset( | 1013 globals->system_http_transaction_factory.reset( |
1014 new net::HttpNetworkLayer(globals->system_http_network_session.get())); | 1014 new net::HttpNetworkLayer(globals->system_http_network_session.get())); |
1015 context->set_http_transaction_factory( | 1015 context->set_http_transaction_factory( |
1016 globals->system_http_transaction_factory.get()); | 1016 globals->system_http_transaction_factory.get()); |
1017 | 1017 |
1018 return context; | 1018 return context; |
1019 } | 1019 } |
OLD | NEW |