Add new network parameters needed by chrome53

This commit is contained in:
Cheng Zhao 2016-09-07 17:54:21 +09:00
parent 2bb774996b
commit 676a389ecd
3 changed files with 11 additions and 1 deletions

View file

@ -22,6 +22,8 @@
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "net/base/host_mapping_rules.h" #include "net/base/host_mapping_rules.h"
#include "net/cert/cert_verifier.h" #include "net/cert/cert_verifier.h"
#include "net/cert/ct_policy_enforcer.h"
#include "net/cert/multi_log_ct_verifier.h"
#include "net/cookies/cookie_monster.h" #include "net/cookies/cookie_monster.h"
#include "net/dns/mapped_host_resolver.h" #include "net/dns/mapped_host_resolver.h"
#include "net/http/http_auth_filter.h" #include "net/http/http_auth_filter.h"
@ -274,6 +276,9 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
new net::HttpServerPropertiesImpl); new net::HttpServerPropertiesImpl);
storage_->set_http_server_properties(std::move(server_properties)); storage_->set_http_server_properties(std::move(server_properties));
cert_transparency_verifier_.reset(new net::MultiLogCTVerifier());
ct_policy_enforcer_.reset(new net::CTPolicyEnforcer());
net::HttpNetworkSession::Params network_session_params; net::HttpNetworkSession::Params network_session_params;
network_session_params.cert_verifier = url_request_context_->cert_verifier(); network_session_params.cert_verifier = url_request_context_->cert_verifier();
network_session_params.proxy_service = url_request_context_->proxy_service(); network_session_params.proxy_service = url_request_context_->proxy_service();
@ -287,6 +292,9 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
network_session_params.http_auth_handler_factory = network_session_params.http_auth_handler_factory =
url_request_context_->http_auth_handler_factory(); url_request_context_->http_auth_handler_factory();
network_session_params.net_log = url_request_context_->net_log(); network_session_params.net_log = url_request_context_->net_log();
network_session_params.cert_transparency_verifier =
cert_transparency_verifier_.get();
network_session_params.ct_policy_enforcer = ct_policy_enforcer_.get();
// --disable-http2 // --disable-http2
if (command_line.HasSwitch(switches::kDisableHttp2)) { if (command_line.HasSwitch(switches::kDisableHttp2)) {

View file

@ -88,6 +88,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
std::unique_ptr<net::HostMappingRules> host_mapping_rules_; std::unique_ptr<net::HostMappingRules> host_mapping_rules_;
std::unique_ptr<net::HttpAuthPreferences> http_auth_preferences_; std::unique_ptr<net::HttpAuthPreferences> http_auth_preferences_;
std::unique_ptr<net::HttpNetworkSession> http_network_session_; std::unique_ptr<net::HttpNetworkSession> http_network_session_;
std::unique_ptr<net::CTVerifier> cert_transparency_verifier_;
std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer_;
content::ProtocolHandlerMap protocol_handlers_; content::ProtocolHandlerMap protocol_handlers_;
content::URLRequestInterceptorScopedVector protocol_interceptors_; content::URLRequestInterceptorScopedVector protocol_interceptors_;

@ -1 +1 @@
Subproject commit 60ec84b4b3ee4862aa8c93c0e0e04871ee3ac177 Subproject commit 346dfe40a9658cc40924d29a1deb1d9669509076