summaryrefslogtreecommitdiffstats
path: root/src/core/net/proxy_config_service_qt.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-10-17 19:28:27 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-02-04 15:33:44 +0000
commit740922cc2d7a9b90956d2cf7923c996d79e98a2a (patch)
treedacc532ba7d06f48a6700b2d0b09a0df1f2386da /src/core/net/proxy_config_service_qt.cpp
parent17cc1a0cbe37ac33200012eb49c17e3b48c90a55 (diff)
Add proxy switches handling
This change adds switches for proxy: https://www.chromium.org/developers/design-documents/network-settings [ChangeLog] Uses proxy switches for initial proxy configuration Fixes: QTBUG-71229 Change-Id: I1bc02f20c20d737234c650a18f0e0f7c1c63a464 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/net/proxy_config_service_qt.cpp')
-rw-r--r--src/core/net/proxy_config_service_qt.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/net/proxy_config_service_qt.cpp b/src/core/net/proxy_config_service_qt.cpp
index 13b969281..ff8ab20aa 100644
--- a/src/core/net/proxy_config_service_qt.cpp
+++ b/src/core/net/proxy_config_service_qt.cpp
@@ -47,6 +47,7 @@
#include "base/bind.h"
#include "content/public/browser/browser_thread.h"
+#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
using content::BrowserThread;
@@ -68,10 +69,13 @@ net::ProxyServer ProxyConfigServiceQt::fromQNetworkProxy(const QNetworkProxy &qt
}
}
-ProxyConfigServiceQt::ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService)
+ProxyConfigServiceQt::ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService,
+ const net::ProxyConfigWithAnnotation& initialConfig, ProxyPrefs::ConfigState initialState)
: m_baseService(baseService.release()),
m_usesSystemConfiguration(false),
- m_registeredObserver(false)
+ m_registeredObserver(false),
+ m_prefConfig(initialConfig),
+ m_perfState(initialState)
{
}
@@ -100,8 +104,10 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy
ConfigAvailability systemAvailability = net::ProxyConfigService::CONFIG_UNSET;
if (m_baseService.get())
systemAvailability = m_baseService->GetLatestProxyConfig(&systemConfig);
- *config = systemConfig;
- // make sure to get updates via OnProxyConfigChanged
+ ProxyPrefs::ConfigState configState;
+ systemAvailability = PrefProxyConfigTrackerImpl::GetEffectiveProxyConfig(
+ m_perfState, m_prefConfig, systemAvailability, systemConfig,
+ false, &configState, config);
RegisterObserver();
return systemAvailability;
}