allow embedder to provide RequireCTDelegate

This commit is contained in:
deepak1556 2016-10-17 16:06:37 +05:30
parent fca548b2fc
commit aa7255bad5
2 changed files with 10 additions and 2 deletions

View file

@ -267,9 +267,12 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
net::HttpAuthHandlerRegistryFactory::Create(
http_auth_preferences_.get(), host_resolver.get());
std::unique_ptr<net::TransportSecurityState> transport_security_state =
base::WrapUnique(new net::TransportSecurityState);
transport_security_state->SetRequireCTDelegate(
delegate_->GetRequireCTDelegate());
storage_->set_transport_security_state(std::move(transport_security_state));
storage_->set_cert_verifier(delegate_->CreateCertVerifier());
storage_->set_transport_security_state(
base::WrapUnique(new net::TransportSecurityState));
storage_->set_ssl_config_service(delegate_->CreateSSLConfigService());
storage_->set_http_auth_handler_factory(std::move(auth_handler_factory));
std::unique_ptr<net::HttpServerProperties> server_properties(

View file

@ -10,6 +10,7 @@
#include "content/public/browser/content_browser_client.h"
#include "net/cookies/cookie_monster.h"
#include "net/http/http_cache.h"
#include "net/http/transport_security_state.h"
#include "net/http/url_security_manager.h"
#include "net/url_request/url_request_context_getter.h"
@ -52,6 +53,10 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
virtual std::unique_ptr<net::CertVerifier> CreateCertVerifier();
virtual net::SSLConfigService* CreateSSLConfigService();
virtual std::vector<std::string> GetCookieableSchemes();
virtual net::TransportSecurityState::RequireCTDelegate*
GetRequireCTDelegate() {
return nullptr;
}
};
URLRequestContextGetter(