diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-10-17 19:28:27 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2019-02-04 15:33:44 +0000 |
commit | 740922cc2d7a9b90956d2cf7923c996d79e98a2a (patch) | |
tree | dacc532ba7d06f48a6700b2d0b09a0df1f2386da /src/core/profile_io_data_qt.cpp | |
parent | 17cc1a0cbe37ac33200012eb49c17e3b48c90a55 (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/profile_io_data_qt.cpp')
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 20754ed7a..55d3bba5a 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -49,6 +49,7 @@ #include "content/public/common/content_features.h" #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" #include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h" +#include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "net/cert/cert_verifier.h" #include "net/cert/ct_log_verifier.h" #include "net/cert/ct_policy_enforcer.h" @@ -640,10 +641,15 @@ void ProfileIODataQt::updateStorageSettings() // must synchronously run on the glib message loop. This will be passed to // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). Q_ASSERT(m_proxyConfigService == 0); + net::ProxyConfigWithAnnotation initialConfig; + ProxyPrefs::ConfigState initialConfigState = PrefProxyConfigTrackerImpl::ReadPrefConfig( + m_profileAdapter->profile()->GetPrefs(), &initialConfig); + m_proxyConfigService = new ProxyConfigServiceQt( net::ProxyResolutionService::CreateSystemProxyConfigService( - base::CreateSingleThreadTaskRunnerWithTraits({content::BrowserThread::IO}))); + base::CreateSingleThreadTaskRunnerWithTraits({content::BrowserThread::IO})), + initialConfig, initialConfigState); //pass interface to io thread m_proxyResolverFactoryInterface = ChromeMojoProxyResolverFactory::CreateWithStrongBinding().PassInterface(); if (m_initialized) |