Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: mojo/shell/url_request_context_getter.cc

Issue 59693008: Give mojo_shell a TransportSecurityPersister (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sprinkle some NET_EXPORT Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/url_request_context_getter.h ('k') | net/http/transport_security_persister.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/url_request_context_getter.cc
diff --git a/mojo/shell/url_request_context_getter.cc b/mojo/shell/url_request_context_getter.cc
index 9de52dbc56937d17cd6df8c5eb4aee7cc1d7fbce..9e870b0a076eb9c9e2cf5f8b044fda9fafefb998 100644
--- a/mojo/shell/url_request_context_getter.cc
+++ b/mojo/shell/url_request_context_getter.cc
@@ -22,6 +22,12 @@
namespace mojo {
namespace shell {
+namespace {
+
+const bool kTransportSecurityPersisterIsReadOnly = false;
+
+} // namespace
+
URLRequestContextGetter::URLRequestContextGetter(
base::FilePath base_path,
base::SingleThreadTaskRunner* network_task_runner,
@@ -55,7 +61,18 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
storage_->set_proxy_service(net::ProxyService::CreateDirect());
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
- storage_->set_transport_security_state(new net::TransportSecurityState());
+
+ net::TransportSecurityState* transport_security_state =
+ new net::TransportSecurityState();
+ storage_->set_transport_security_state(transport_security_state);
+
+ transport_security_persister_.reset(
+ new net::TransportSecurityPersister(
+ transport_security_state,
+ base_path_,
+ file_task_runner_,
+ kTransportSecurityPersisterIsReadOnly));
+
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
new net::DefaultServerBoundCertStore(NULL), file_task_runner_));
storage_->set_http_server_properties(
« no previous file with comments | « mojo/shell/url_request_context_getter.h ('k') | net/http/transport_security_persister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698