diff options
Diffstat (limited to 'src/core/profile_io_data_qt.cpp')
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 01a4e98aa..a73a7c21d 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -79,6 +79,7 @@ #include "services/network/proxy_service_mojo.h" #include "net/client_cert_override.h" +#include "net/client_cert_store_data.h" #include "net/cookie_monster_delegate_qt.h" #include "net/custom_protocol_handler.h" #include "net/network_delegate_qt.h" @@ -168,6 +169,9 @@ static net::HttpNetworkSession::Params generateNetworkSessionParams(bool ignoreC ProfileIODataQt::ProfileIODataQt(ProfileQt *profile) : m_profile(profile), +#if QT_CONFIG(ssl) + m_clientCertificateStoreData(new ClientCertificateStoreData), +#endif m_mutex(QMutex::Recursive), m_weakPtrFactory(this) { @@ -207,6 +211,10 @@ QPointer<ProfileAdapter> ProfileIODataQt::profileAdapter() void ProfileIODataQt::shutdownOnUIThread() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +#if QT_CONFIG(ssl) + delete m_clientCertificateStoreData; + m_clientCertificateStoreData = nullptr; +#endif bool posted = content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, this); if (!posted) { qWarning() << "Could not delete ProfileIODataQt on io thread !"; @@ -771,9 +779,20 @@ void ProfileIODataQt::updateUsedForGlobalCertificateVerification() base::BindOnce(&ProfileIODataQt::setGlobalCertificateVerification, m_weakPtr)); } +#if QT_CONFIG(ssl) +ClientCertificateStoreData *ProfileIODataQt::clientCertificateStoreData() +{ + return m_clientCertificateStoreData; +} +#endif + std::unique_ptr<net::ClientCertStore> ProfileIODataQt::CreateClientCertStore() { - return std::unique_ptr<net::ClientCertStore>(new ClientCertOverrideStore()); +#if QT_CONFIG(ssl) + return std::unique_ptr<net::ClientCertStore>(new ClientCertOverrideStore(m_clientCertificateStoreData)); +#else + return nullptr; +#endif } // static |