From 5d9c41c416505c11127ee3690486e049a9cb088b Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 21 Sep 2015 22:14:32 +0530 Subject: [PATCH] allowing delegates to provide their sslconfigservice --- brightray/browser/url_request_context_getter.cc | 6 +++++- brightray/browser/url_request_context_getter.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index b27a94cb3a..4150b777f7 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -117,6 +117,10 @@ URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(const base::Fil BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); } +net::SSLConfigService* URLRequestContextGetter::Delegate::CreateSSLConfigService() { + return new net::SSLConfigServiceDefaults; +} + URLRequestContextGetter::URLRequestContextGetter( Delegate* delegate, NetLog* net_log, @@ -239,7 +243,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); 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); scoped_ptr server_properties( new net::HttpServerPropertiesImpl); diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index ab773b29a4..830171a52c 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -43,6 +43,7 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { content::URLRequestInterceptorScopedVector* protocol_interceptors); virtual net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory( const base::FilePath& base_path); + virtual net::SSLConfigService* CreateSSLConfigService(); }; URLRequestContextGetter(