Merge pull request #143 from deepak1556/ssl_version_config_patch

allowing delegates to provide their sslconfigservice
This commit is contained in:
Cheng Zhao 2015-09-23 10:41:27 +08:00
commit ab878c5f98
2 changed files with 6 additions and 1 deletions

View file

@ -117,6 +117,10 @@ URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(const base::Fil
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
} }
net::SSLConfigService* URLRequestContextGetter::Delegate::CreateSSLConfigService() {
return new net::SSLConfigServiceDefaults;
}
URLRequestContextGetter::URLRequestContextGetter( URLRequestContextGetter::URLRequestContextGetter(
Delegate* delegate, Delegate* delegate,
NetLog* net_log, NetLog* net_log,
@ -239,7 +243,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
storage_->set_transport_security_state(new net::TransportSecurityState); storage_->set_transport_security_state(new net::TransportSecurityState);
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); storage_->set_ssl_config_service(delegate_->CreateSSLConfigService());
storage_->set_http_auth_handler_factory(auth_handler_factory); storage_->set_http_auth_handler_factory(auth_handler_factory);
scoped_ptr<net::HttpServerProperties> server_properties( scoped_ptr<net::HttpServerProperties> server_properties(
new net::HttpServerPropertiesImpl); new net::HttpServerPropertiesImpl);

View file

@ -43,6 +43,7 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
content::URLRequestInterceptorScopedVector* protocol_interceptors); content::URLRequestInterceptorScopedVector* protocol_interceptors);
virtual net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory( virtual net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory(
const base::FilePath& base_path); const base::FilePath& base_path);
virtual net::SSLConfigService* CreateSSLConfigService();
}; };
URLRequestContextGetter( URLRequestContextGetter(