summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-12 12:52:12 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-12-05 08:47:13 +0100
commit34d03cc0f3efac0027ae928e2f5b5fe2d9612604 (patch)
treed54a26731cea1539259672406e43f75c1dacfba2 /src/core/web_engine_context.cpp
parent55ba42566069d271af75545bc7175cfe5dc95904 (diff)
Experimental network-service support
Is default off, enable with --enable-network-service. Done: * Basic browsing * Basic profile settings * Custom URL schemes * UI-thread interceptors * CookieStore API * CookieStore filters * CookieStore changed events Missing: * deprecated interceptors * complete profile settings * cleanup of system network-context * proxy settings Change-Id: I6af92da40147b968a938d1263df54c4cfe7bcf6d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index a4ceb3a97..6e805fa67 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -73,6 +73,7 @@
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
+#include "content/public/common/network_service_util.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "media/audio/audio_manager.h"
@@ -529,8 +530,12 @@ WebEngineContext::WebEngineContext()
// The video-capture service is not functioning at this moment (since 69)
appendToFeatureList(disableFeatures, features::kMojoVideoCapture.name);
- // We do not yet support the network-service, but it is enabled by default since 75.
- appendToFeatureList(disableFeatures, network::features::kNetworkService.name);
+ // We do not yet fully support the network-service, but it has been enabled by default since 75.
+ bool enableNetworkService = parsedCommandLine->HasSwitch("enable-network-service");
+ parsedCommandLine->RemoveSwitch("enable-network-service");
+ if (!enableNetworkService)
+ appendToFeatureList(disableFeatures, network::features::kNetworkService.name);
+
// BlinkGenPropertyTrees is enabled by default in 75, but causes regressions.
appendToFeatureList(disableFeatures, blink::features::kBlinkGenPropertyTrees.name);
@@ -677,6 +682,9 @@ WebEngineContext::WebEngineContext()
m_serviceManagerEnvironment = std::make_unique<content::ServiceManagerEnvironment>(content::BrowserTaskExecutor::CreateIOThread());
m_startupData = m_serviceManagerEnvironment->CreateBrowserStartupData();
+ if (base::FeatureList::IsEnabled(network::features::kNetworkService))
+ content::ForceInProcessNetworkService(true);
+
// Once the MessageLoop has been created, attach a top-level RunLoop.
m_runLoop.reset(new base::RunLoop);
m_runLoop->BeforeRun();