summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/configure/BUILD.root.gn.in9
-rw-r--r--src/core/content_utility_client_qt.cpp18
-rw-r--r--src/core/net/system_network_context_manager.cpp20
3 files changed, 40 insertions, 7 deletions
diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index 550bd17e0..ffe684b09 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -361,6 +361,15 @@ source_set("qtwebengine_sources") {
"//chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h",
]
}
+ if (is_win) {
+ sources += [
+ "//chrome/browser/net/chrome_mojo_proxy_resolver_win.cc",
+ "//chrome/browser/net/chrome_mojo_proxy_resolver_win.h",
+ ]
+ deps += [ "//services/proxy_resolver_win",
+ "//services/proxy_resolver_win/public/mojom",
+ ]
+ }
if (enable_spellcheck) {
deps += [
":qtwebengine_spellcheck_sources",
diff --git a/src/core/content_utility_client_qt.cpp b/src/core/content_utility_client_qt.cpp
index c76cab2f9..d506cb68e 100644
--- a/src/core/content_utility_client_qt.cpp
+++ b/src/core/content_utility_client_qt.cpp
@@ -2,11 +2,15 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "content_utility_client_qt.h"
-
#include "base/no_destructor.h"
#include "mojo/public/cpp/bindings/service_factory.h"
#include "services/proxy_resolver/proxy_resolver_factory_impl.h"
+#if BUILDFLAG(IS_WIN)
+#include "services/proxy_resolver_win/public/mojom/proxy_resolver_win.mojom.h"
+#include "services/proxy_resolver_win/windows_system_proxy_resolver_impl.h"
+#endif
+
namespace QtWebEngineCore {
ContentUtilityClientQt::ContentUtilityClientQt()
@@ -20,9 +24,21 @@ auto RunProxyResolver(mojo::PendingReceiver<proxy_resolver::mojom::ProxyResolver
return std::make_unique<proxy_resolver::ProxyResolverFactoryImpl>(std::move(receiver));
}
+#if BUILDFLAG(IS_WIN)
+auto RunWindowsSystemProxyResolver(
+ mojo::PendingReceiver<proxy_resolver_win::mojom::WindowsSystemProxyResolver> receiver)
+{
+ return std::make_unique<proxy_resolver_win::WindowsSystemProxyResolverImpl>(
+ std::move(receiver));
+}
+#endif
+
void ContentUtilityClientQt::RegisterIOThreadServices(mojo::ServiceFactory &services)
{
services.Add(RunProxyResolver);
+#if BUILDFLAG(IS_WIN)
+ services.Add(RunWindowsSystemProxyResolver);
+#endif
}
} // namespace
diff --git a/src/core/net/system_network_context_manager.cpp b/src/core/net/system_network_context_manager.cpp
index ec936fd10..83e122aab 100644
--- a/src/core/net/system_network_context_manager.cpp
+++ b/src/core/net/system_network_context_manager.cpp
@@ -31,6 +31,7 @@
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
#if BUILDFLAG(IS_WIN)
+#include "chrome/browser/net/chrome_mojo_proxy_resolver_win.h"
#include "components/os_crypt/os_crypt.h"
#include "content/public/common/network_service_util.h"
#endif
@@ -280,13 +281,20 @@ void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams(network::
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kSingleProcess)) {
- LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode.";
- } else {
- network_context_params->proxy_resolver_factory =
- ChromeMojoProxyResolverFactory::CreateWithSelfOwnedReceiver();
+ if (!command_line.HasSwitch(switches::kWinHttpProxyResolver)) {
+ if (command_line.HasSwitch(switches::kSingleProcess)) {
+ LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode.";
+ } else {
+ network_context_params->proxy_resolver_factory =
+ ChromeMojoProxyResolverFactory::CreateWithSelfOwnedReceiver();
+ }
}
-
+#if BUILDFLAG(IS_WIN)
+ if (command_line.HasSwitch(switches::kUseSystemProxyResolver)) {
+ network_context_params->windows_system_proxy_resolver =
+ ChromeMojoProxyResolverWin::CreateWithSelfOwnedReceiver();
+ }
+#endif
// Use the SystemNetworkContextManager to populate and update SSL
// configuration. The SystemNetworkContextManager is owned by the
// BrowserProcess itself, so will only be destroyed on shutdown, at which