summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-08-28 16:49:11 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-08-28 16:35:33 +0000
commit633ceae0a75055b16d89032f9a6de0fac29ddb2f (patch)
tree963eb122c4160632dbe628c27006470da5fd9904 /src/core
parent0f6908b5f9eca09cf086410344a862b9d59ef727 (diff)
Handle --explicitly-allowed-ports
Chromium handles the flag for the render process, but with multi-process we need to enable it for the browser process as well. Task-number: QTBUG-62808 Change-Id: I1111dd7a2fd58876978ec5299bfb7abea8cb8487 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_engine_context.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 9d993b7f4..98d90cb8f 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -67,6 +67,7 @@
#include "content/renderer/in_process_renderer_thread.h"
#include "content/utility/in_process_utility_thread.h"
#include "gpu/command_buffer/service/gpu_switches.h"
+#include "net/base/port_util.h"
#include "ui/events/event_switches.h"
#include "ui/native_theme/native_theme_switches.h"
#include "ui/gl/gl_switches.h"
@@ -455,6 +456,11 @@ WebEngineContext::WebEngineContext()
base::ThreadRestrictions::SetIOAllowed(true);
+ if (parsedCommandLine->HasSwitch(switches::kExplicitlyAllowedPorts)) {
+ std::string allowedPorts = parsedCommandLine->GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
+ net::SetExplicitlyAllowedPorts(allowedPorts);
+ }
+
#if defined(ENABLE_PLUGINS)
// Creating pepper plugins from the page (which calls PluginService::GetPluginInfoArray)
// might fail unless the page queried the list of available plugins at least once