summaryrefslogtreecommitdiffstats
path: root/src/core/profile_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/profile_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/profile_qt.cpp')
-rw-r--r--src/core/profile_qt.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp
index e4698c677..d98bb5c9c 100644
--- a/src/core/profile_qt.cpp
+++ b/src/core/profile_qt.cpp
@@ -41,6 +41,7 @@
#include "profile_adapter.h"
#include "browsing_data_remover_delegate_qt.h"
+#include "command_line_pref_store_qt.h"
#include "download_manager_delegate_qt.h"
#include "net/ssl_host_state_delegate_qt.h"
#include "net/url_request_context_getter_qt.h"
@@ -48,6 +49,7 @@
#include "qtwebenginecoreglobal_p.h"
#include "type_conversion.h"
#include "web_engine_library_info.h"
+#include "web_engine_context.h"
#include "base/time/time.h"
#include "content/public/browser/browser_thread.h"
@@ -62,6 +64,7 @@
#include "components/prefs/pref_service_factory.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/user_prefs/user_prefs.h"
+#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#if QT_CONFIG(webengine_spellchecker)
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/common/pref_names.h"
@@ -76,8 +79,10 @@ ProfileQt::ProfileQt(ProfileAdapter *profileAdapter)
{
PrefServiceFactory factory;
factory.set_user_prefs(new InMemoryPrefStore);
+ factory.set_command_line_prefs(base::MakeRefCounted<CommandLinePrefStoreQt>(
+ WebEngineContext::commandLine()));
PrefRegistrySimple *registry = new PrefRegistrySimple();
-
+ PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
#if QT_CONFIG(webengine_spellchecker)
// Initial spellcheck settings
registry->RegisterStringPref(prefs::kAcceptLanguages, std::string());