chore: make it possible to turn on NetworkService with cmd flag (#17729)
This commit is contained in:
parent
e7c48922e7
commit
748632d655
3 changed files with 28 additions and 2 deletions
|
@ -208,8 +208,7 @@ void AtomBrowserMainParts::InitializeFeatureList() {
|
||||||
// Can be reenabled when our site instance policy is aligned with chromium
|
// Can be reenabled when our site instance policy is aligned with chromium
|
||||||
// when node integration is enabled.
|
// when node integration is enabled.
|
||||||
disable_features +=
|
disable_features +=
|
||||||
std::string(",") + features::kSpareRendererForSitePerProcess.name +
|
std::string(",") + features::kSpareRendererForSitePerProcess.name;
|
||||||
std::string(",") + network::features::kNetworkService.name;
|
|
||||||
auto feature_list = std::make_unique<base::FeatureList>();
|
auto feature_list = std::make_unique<base::FeatureList>();
|
||||||
feature_list->InitializeFromCommandLine(enable_features, disable_features);
|
feature_list->InitializeFromCommandLine(enable_features, disable_features);
|
||||||
base::FeatureList::SetInstance(std::move(feature_list));
|
base::FeatureList::SetInstance(std::move(feature_list));
|
||||||
|
|
|
@ -72,3 +72,4 @@ fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
|
||||||
fix_disable_usage_of_setapplicationisdaemon_and.patch
|
fix_disable_usage_of_setapplicationisdaemon_and.patch
|
||||||
disable_custom_libcxx_on_windows.patch
|
disable_custom_libcxx_on_windows.patch
|
||||||
fix_retain_compatibility_with_msvc.patch
|
fix_retain_compatibility_with_msvc.patch
|
||||||
|
disable_network_services_by_default.patch
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cheng Zhao <zcbenz@gmail.com>
|
||||||
|
Date: Tue, 9 April 2019 14:57:02 -0700
|
||||||
|
Subject: disable_network_services_by_default.patch
|
||||||
|
|
||||||
|
Disable NetworkService by default.
|
||||||
|
|
||||||
|
This allows us to enable NetworkService with command line flags, which makes it
|
||||||
|
easier to work on NetworkService migration.
|
||||||
|
|
||||||
|
We should remove this patch after all Electron's code has been migrated to the
|
||||||
|
NetworkService.
|
||||||
|
|
||||||
|
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
|
||||||
|
index 5276ed9798d9..9d4d6421c75a 100644
|
||||||
|
--- a/services/network/public/cpp/features.cc
|
||||||
|
+++ b/services/network/public/cpp/features.cc
|
||||||
|
@@ -21,7 +21,7 @@ const base::Feature kNetworkService {
|
||||||
|
"NetworkService",
|
||||||
|
#if defined(OS_WIN) || defined(OS_MACOSX) || \
|
||||||
|
(defined(OS_LINUX) && !defined(IS_CHROMECAST))
|
||||||
|
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||||
|
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
base::FEATURE_DISABLED_BY_DEFAULT
|
Loading…
Reference in a new issue