diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-10 14:39:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-12 12:46:13 +0200 |
commit | 4629185e555e6c891d6308ae7cafa584ce6d731f (patch) | |
tree | 1ed9f01ec7fdb6f52a607cab0a31b60bb60179d2 /src/core/profile_adapter.cpp | |
parent | f8527fa9427984082cd425d304d29fd030ff5b1a (diff) | |
parent | 5d41d39b82acb3e2da597df0588fb906e212d608 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
examples/webenginewidgets/printme/printhandler.cpp
src/3rdparty
src/core/api/qwebenginepage_p.h
src/core/content_browser_client_qt.h
src/core/web_contents_adapter_client.h
src/core/web_contents_delegate_qt.cpp
src/core/web_contents_delegate_qt.h
src/webenginequick/api/qquickwebengineview_p_p.h
tests/auto/quick/qmltests/data/tst_download.qml
tests/auto/quick/qmltests/data/tst_viewSoure.qml
tests/auto/widgets/loadsignals/tst_loadsignals.cpp
tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
Diffstat (limited to 'src/core/profile_adapter.cpp')
-rw-r--r-- | src/core/profile_adapter.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp index bc138b7d0..9a6275a84 100644 --- a/src/core/profile_adapter.cpp +++ b/src/core/profile_adapter.cpp @@ -87,6 +87,9 @@ inline QString buildLocationFromStandardPath(const QString &standardPath, const namespace QtWebEngineCore { +// static +QPointer<ProfileAdapter> ProfileAdapter::s_profileForGlobalCertificateVerification; + ProfileAdapter::ProfileAdapter(const QString &storageName): m_name(storageName) , m_offTheRecord(storageName.isEmpty()) @@ -654,26 +657,26 @@ void ProfileAdapter::setUseForGlobalCertificateVerification(bool enable) if (m_usedForGlobalCertificateVerification == enable) return; - static QPointer<ProfileAdapter> profileForglobalCertificateVerification; - m_usedForGlobalCertificateVerification = enable; if (enable) { - if (profileForglobalCertificateVerification) { - profileForglobalCertificateVerification->m_usedForGlobalCertificateVerification = false; - if (!m_profile->m_profileIOData->isClearHttpCacheInProgress()) - profileForglobalCertificateVerification->m_profile->m_profileIOData->resetNetworkContext(); - for (auto *client : qAsConst(profileForglobalCertificateVerification->m_clients)) + if (s_profileForGlobalCertificateVerification) { + s_profileForGlobalCertificateVerification->m_usedForGlobalCertificateVerification = false; + for (auto *client : qAsConst(s_profileForGlobalCertificateVerification->m_clients)) client->useForGlobalCertificateVerificationChanged(); + } else { + // OCSP enabled + for (auto adapter : qAsConst(WebEngineContext::current()->m_profileAdapters)) + adapter->m_profile->m_profileIOData->resetNetworkContext(); } - profileForglobalCertificateVerification = this; + s_profileForGlobalCertificateVerification = this; } else { - Q_ASSERT(profileForglobalCertificateVerification); - Q_ASSERT(profileForglobalCertificateVerification == this); - profileForglobalCertificateVerification = nullptr; + Q_ASSERT(s_profileForGlobalCertificateVerification); + Q_ASSERT(s_profileForGlobalCertificateVerification == this); + s_profileForGlobalCertificateVerification = nullptr; + // OCSP disabled + for (auto adapter : qAsConst(WebEngineContext::current()->m_profileAdapters)) + adapter->m_profile->m_profileIOData->resetNetworkContext(); } - - if (!m_profile->m_profileIOData->isClearHttpCacheInProgress()) - m_profile->m_profileIOData->resetNetworkContext(); } bool ProfileAdapter::isUsedForGlobalCertificateVerification() const |