diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-02-12 12:59:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-02 11:48:10 +0100 |
commit | 218d7ddae16c777714819eab5c487a355413279b (patch) | |
tree | 9107eac0a35301e8487bbfa54e5000dac9054260 /src/core/profile_io_data_qt.cpp | |
parent | c3ab932f8b2f3a52383ce0db3ff67c925b138bde (diff) |
Improvements to dynamic update of profiles
Avoid reseting network-context on accept-language change, and trigger
update of url-loaders when customer schemes change, but not when a set
of none are cleared.
Change-Id: Iad268b7066cfd3854348f9a103120c4a104be7af
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/profile_io_data_qt.cpp')
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 6eb758f46..7e1313a16 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -420,6 +420,7 @@ network::mojom::NetworkContextParamsPtr ProfileIODataQt::CreateNetworkContextPar SystemNetworkContextManager::GetInstance()->CreateDefaultNetworkContextParams(); network_context_params->context_name = m_profile->profileAdapter()->storageName().toStdString(); + network_context_params->user_agent = m_httpUserAgent.toStdString(); network_context_params->accept_language = m_httpAcceptLanguage.toStdString(); network_context_params->enable_referrers = true; @@ -429,10 +430,10 @@ network::mojom::NetworkContextParamsPtr ProfileIODataQt::CreateNetworkContextPar network_context_params->http_cache_enabled = m_httpCacheType != ProfileAdapter::NoCache; network_context_params->http_cache_max_size = m_httpCacheMaxSize; - if (m_httpCacheType == ProfileAdapter::DiskHttpCache) + if (m_httpCacheType == ProfileAdapter::DiskHttpCache && !m_httpCachePath.isEmpty()) network_context_params->http_cache_path = toFilePath(m_httpCachePath); - if (m_persistentCookiesPolicy != ProfileAdapter::NoPersistentCookies) { + if (m_persistentCookiesPolicy != ProfileAdapter::NoPersistentCookies && !m_dataPath.isEmpty()) { base::FilePath cookie_path = toFilePath(m_dataPath); cookie_path = cookie_path.AppendASCII("Cookies"); network_context_params->cookie_path = cookie_path; |