|
@@ -12,6 +12,7 @@
|
|
|
#include "atom/browser/browser.h"
|
|
|
#include "atom/browser/net/asar/asar_protocol_handler.h"
|
|
|
#include "atom/browser/net/atom_cert_verifier.h"
|
|
|
+#include "atom/browser/net/atom_ct_delegate.h"
|
|
|
#include "atom/browser/net/atom_network_delegate.h"
|
|
|
#include "atom/browser/net/atom_ssl_config_service.h"
|
|
|
#include "atom/browser/net/atom_url_request_job_factory.h"
|
|
@@ -67,10 +68,11 @@ std::string RemoveWhitespace(const std::string& str) {
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
-AtomBrowserContext::AtomBrowserContext(
|
|
|
- const std::string& partition, bool in_memory,
|
|
|
- const base::DictionaryValue& options)
|
|
|
+AtomBrowserContext::AtomBrowserContext(const std::string& partition,
|
|
|
+ bool in_memory,
|
|
|
+ const base::DictionaryValue& options)
|
|
|
: brightray::BrowserContext(partition, in_memory),
|
|
|
+ ct_delegate_(new AtomCTDelegate),
|
|
|
network_delegate_(new AtomNetworkDelegate),
|
|
|
cookie_delegate_(new AtomCookieDelegate) {
|
|
|
// Construct user agent string.
|
|
@@ -190,7 +192,7 @@ content::PermissionManager* AtomBrowserContext::GetPermissionManager() {
|
|
|
}
|
|
|
|
|
|
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
|
|
|
- return base::WrapUnique(new AtomCertVerifier);
|
|
|
+ return base::WrapUnique(new AtomCertVerifier(ct_delegate_.get()));
|
|
|
}
|
|
|
|
|
|
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {
|
|
@@ -205,6 +207,11 @@ std::vector<std::string> AtomBrowserContext::GetCookieableSchemes() {
|
|
|
return default_schemes;
|
|
|
}
|
|
|
|
|
|
+net::TransportSecurityState::RequireCTDelegate*
|
|
|
+AtomBrowserContext::GetRequireCTDelegate() {
|
|
|
+ return ct_delegate_.get();
|
|
|
+}
|
|
|
+
|
|
|
void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
|
|
|
pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
|
|
|
base::FilePath());
|