summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch')
-rw-r--r--www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch64
1 files changed, 33 insertions, 31 deletions
diff --git a/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch b/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch
index 16055fe..65b1887 100644
--- a/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch
+++ b/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch
@@ -15,9 +15,9 @@ with limited CPU/memory resources and it is disabled by default.
15 net/socket/client_socket_pool_manager.cc | 16 ++++++++++++++++ 15 net/socket/client_socket_pool_manager.cc | 16 ++++++++++++++++
16 7 files changed, 42 insertions(+) 16 7 files changed, 42 insertions(+)
17 17
18--- a/chrome/browser/BUILD.gn 18--- chrome/browser/BUILD.gn.orig
19+++ b/chrome/browser/BUILD.gn 19+++ chrome/browser/BUILD.gn
20@@ -2102,6 +2102,7 @@ static_library("browser") { 20@@ -2126,6 +2126,7 @@ static_library("browser") {
21 "//components/net_log", 21 "//components/net_log",
22 "//components/network_hints/common:mojo_bindings", 22 "//components/network_hints/common:mojo_bindings",
23 "//components/network_session_configurator/browser", 23 "//components/network_session_configurator/browser",
@@ -25,8 +25,8 @@ with limited CPU/memory resources and it is disabled by default.
25 "//components/network_time", 25 "//components/network_time",
26 "//components/no_state_prefetch/browser", 26 "//components/no_state_prefetch/browser",
27 "//components/no_state_prefetch/common", 27 "//components/no_state_prefetch/common",
28--- a/chrome/browser/bromite_flag_choices.h 28--- chrome/browser/bromite_flag_choices.h.orig
29+++ b/chrome/browser/bromite_flag_choices.h 29+++ chrome/browser/bromite_flag_choices.h
30@@ -4,4 +4,8 @@ 30@@ -4,4 +4,8 @@
31 31
32 #ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ 32 #ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
@@ -36,8 +36,8 @@ with limited CPU/memory resources and it is disabled by default.
36+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"}, 36+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"},
37+}; 37+};
38 #endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ 38 #endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
39--- a/chrome/browser/bromite_flag_entries.h 39--- chrome/browser/bromite_flag_entries.h.orig
40+++ b/chrome/browser/bromite_flag_entries.h 40+++ chrome/browser/bromite_flag_entries.h
41@@ -12,4 +12,8 @@ 41@@ -12,4 +12,8 @@
42 "Enable Canvas::measureText() fingerprint deception", 42 "Enable Canvas::measureText() fingerprint deception",
43 "Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization. ungoogled-chromium flag, Bromite feature.", 43 "Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization. ungoogled-chromium flag, Bromite feature.",
@@ -47,22 +47,24 @@ with limited CPU/memory resources and it is disabled by default.
47+ flag_descriptions::kMaxConnectionsPerHostDescription, 47+ flag_descriptions::kMaxConnectionsPerHostDescription,
48+ kOsAll, MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)}, 48+ kOsAll, MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)},
49 #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ 49 #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
50--- a/chrome/browser/browser_process_impl.cc 50--- chrome/browser/browser_process_impl.cc.orig
51+++ b/chrome/browser/browser_process_impl.cc 51+++ chrome/browser/browser_process_impl.cc
52@@ -19,10 +19,12 @@ 52@@ -19,12 +19,14 @@
53 #include "base/debug/leak_annotations.h" 53 #include "base/debug/leak_annotations.h"
54 #include "base/files/file_path.h" 54 #include "base/files/file_path.h"
55 #include "base/location.h" 55 #include "base/location.h"
56+#include "base/logging.h" 56+#include "base/logging.h"
57 #include "base/macros.h"
57 #include "base/memory/ptr_util.h" 58 #include "base/memory/ptr_util.h"
58 #include "base/metrics/histogram_macros.h" 59 #include "base/metrics/histogram_macros.h"
59 #include "base/path_service.h" 60 #include "base/path_service.h"
60 #include "base/run_loop.h" 61 #include "base/run_loop.h"
62 #include "base/single_thread_task_runner.h"
61+#include "base/strings/string_number_conversions.h" 63+#include "base/strings/string_number_conversions.h"
62 #include "base/synchronization/waitable_event.h" 64 #include "base/synchronization/waitable_event.h"
63 #include "base/task/single_thread_task_runner.h"
64 #include "base/task/task_traits.h" 65 #include "base/task/task_traits.h"
65@@ -102,6 +104,7 @@ 66 #include "base/task/thread_pool.h"
67@@ -103,6 +105,7 @@
66 #include "components/metrics/metrics_service.h" 68 #include "components/metrics/metrics_service.h"
67 #include "components/metrics_services_manager/metrics_services_manager.h" 69 #include "components/metrics_services_manager/metrics_services_manager.h"
68 #include "components/metrics_services_manager/metrics_services_manager_client.h" 70 #include "components/metrics_services_manager/metrics_services_manager_client.h"
@@ -70,7 +72,7 @@ with limited CPU/memory resources and it is disabled by default.
70 #include "components/network_time/network_time_tracker.h" 72 #include "components/network_time/network_time_tracker.h"
71 #include "components/permissions/permissions_client.h" 73 #include "components/permissions/permissions_client.h"
72 #include "components/policy/core/common/policy_service.h" 74 #include "components/policy/core/common/policy_service.h"
73@@ -134,6 +137,7 @@ 75@@ -135,6 +138,7 @@
74 #include "media/media_buildflags.h" 76 #include "media/media_buildflags.h"
75 #include "mojo/public/cpp/bindings/pending_receiver.h" 77 #include "mojo/public/cpp/bindings/pending_receiver.h"
76 #include "net/log/net_log.h" 78 #include "net/log/net_log.h"
@@ -78,9 +80,9 @@ with limited CPU/memory resources and it is disabled by default.
78 #include "ppapi/buildflags/buildflags.h" 80 #include "ppapi/buildflags/buildflags.h"
79 #include "printing/buildflags/buildflags.h" 81 #include "printing/buildflags/buildflags.h"
80 #include "services/network/public/cpp/features.h" 82 #include "services/network/public/cpp/features.h"
81@@ -343,6 +347,18 @@ void BrowserProcessImpl::Init() { 83@@ -345,6 +349,18 @@ void BrowserProcessImpl::Init() {
82 pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled,
83 base::BindRepeating(&ApplyMetricsReportingPolicy)); 84 base::BindRepeating(&ApplyMetricsReportingPolicy));
85 #endif
84 86
85+ int max_connections_per_host = 0; 87+ int max_connections_per_host = 0;
86+ auto switch_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 88+ auto switch_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
@@ -97,11 +99,11 @@ with limited CPU/memory resources and it is disabled by default.
97 DCHECK(!webrtc_event_log_manager_); 99 DCHECK(!webrtc_event_log_manager_);
98 webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance(); 100 webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance();
99 101
100--- a/chrome/browser/flag_descriptions.cc 102--- chrome/browser/flag_descriptions.cc.orig
101+++ b/chrome/browser/flag_descriptions.cc 103+++ chrome/browser/flag_descriptions.cc
102@@ -1630,6 +1630,10 @@ const char kLogJsConsoleMessagesDescript 104@@ -1621,6 +1621,10 @@ const char kMediaHistoryDescription[] =
103 "Enable logging JS console messages in system logs, please note that they " 105 "Enables Media History which records data around media playbacks on "
104 "may contain PII."; 106 "websites.";
105 107
106+const char kMaxConnectionsPerHostName[] = "Maximum connections per host"; 108+const char kMaxConnectionsPerHostName[] = "Maximum connections per host";
107+const char kMaxConnectionsPerHostDescription[] = 109+const char kMaxConnectionsPerHostDescription[] =
@@ -110,11 +112,11 @@ with limited CPU/memory resources and it is disabled by default.
110 const char kMediaRouterCastAllowAllIPsName[] = 112 const char kMediaRouterCastAllowAllIPsName[] =
111 "Connect to Cast devices on all IP addresses"; 113 "Connect to Cast devices on all IP addresses";
112 const char kMediaRouterCastAllowAllIPsDescription[] = 114 const char kMediaRouterCastAllowAllIPsDescription[] =
113--- a/chrome/browser/flag_descriptions.h 115--- chrome/browser/flag_descriptions.h.orig
114+++ b/chrome/browser/flag_descriptions.h 116+++ chrome/browser/flag_descriptions.h
115@@ -931,6 +931,9 @@ extern const char kLensCameraAssistedSea 117@@ -930,6 +930,9 @@ extern const char kLogJsConsoleMessagesD
116 extern const char kLogJsConsoleMessagesName[]; 118 extern const char kMediaHistoryName[];
117 extern const char kLogJsConsoleMessagesDescription[]; 119 extern const char kMediaHistoryDescription[];
118 120
119+extern const char kMaxConnectionsPerHostName[]; 121+extern const char kMaxConnectionsPerHostName[];
120+extern const char kMaxConnectionsPerHostDescription[]; 122+extern const char kMaxConnectionsPerHostDescription[];
@@ -122,8 +124,8 @@ with limited CPU/memory resources and it is disabled by default.
122 extern const char kMediaRouterCastAllowAllIPsName[]; 124 extern const char kMediaRouterCastAllowAllIPsName[];
123 extern const char kMediaRouterCastAllowAllIPsDescription[]; 125 extern const char kMediaRouterCastAllowAllIPsDescription[];
124 126
125--- a/components/network_session_configurator/common/network_features.cc 127--- components/network_session_configurator/common/network_features.cc.orig
126+++ b/components/network_session_configurator/common/network_features.cc 128+++ components/network_session_configurator/common/network_features.cc
127@@ -8,4 +8,7 @@ 129@@ -8,4 +8,7 @@
128 130
129 namespace features { 131 namespace features {
@@ -132,8 +134,8 @@ with limited CPU/memory resources and it is disabled by default.
132+ kMaxConnectionsPerHostChoice15[] = "15"; 134+ kMaxConnectionsPerHostChoice15[] = "15";
133+ 135+
134 } // namespace features 136 } // namespace features
135--- a/components/network_session_configurator/common/network_features.h 137--- components/network_session_configurator/common/network_features.h.orig
136+++ b/components/network_session_configurator/common/network_features.h 138+++ components/network_session_configurator/common/network_features.h
137@@ -10,6 +10,10 @@ 139@@ -10,6 +10,10 @@
138 140
139 namespace features { 141 namespace features {
@@ -145,8 +147,8 @@ with limited CPU/memory resources and it is disabled by default.
145 } // namespace features 147 } // namespace features
146 148
147 #endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_ 149 #endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_
148--- a/components/network_session_configurator/common/network_switch_list.h 150--- components/network_session_configurator/common/network_switch_list.h.orig
149+++ b/components/network_session_configurator/common/network_switch_list.h 151+++ components/network_session_configurator/common/network_switch_list.h
150@@ -19,6 +19,10 @@ NETWORK_SWITCH(kEnableUserAlternateProto 152@@ -19,6 +19,10 @@ NETWORK_SWITCH(kEnableUserAlternateProto
151 // Enables the QUIC protocol. This is a temporary testing flag. 153 // Enables the QUIC protocol. This is a temporary testing flag.
152 NETWORK_SWITCH(kEnableQuic, "enable-quic") 154 NETWORK_SWITCH(kEnableQuic, "enable-quic")