summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/extra')
-rw-r--r--www/chromium-uc/patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch325
-rw-r--r--www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch334
-rw-r--r--www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch162
-rw-r--r--www/chromium-uc/patches/extra/debian/disable/google-api-warning.patch15
-rw-r--r--www/chromium-uc/patches/extra/debian/disable/welcome-page.patch15
-rw-r--r--www/chromium-uc/patches/extra/debian/fixes/connection-message.patch15
-rw-r--r--www/chromium-uc/patches/extra/debian/gn/parallel.patch28
-rw-r--r--www/chromium-uc/patches/extra/inox-patchset/0006-modify-default-prefs.patch199
-rw-r--r--www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch54
-rw-r--r--www/chromium-uc/patches/extra/inox-patchset/0013-disable-missing-key-warning.patch12
-rw-r--r--www/chromium-uc/patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch15
-rw-r--r--www/chromium-uc/patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch11
-rw-r--r--www/chromium-uc/patches/extra/inox-patchset/0019-disable-battery-status-service.patch102
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/Remove-EV-certificates.patch43
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch20
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch21
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch23
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch40
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch21
-rw-r--r--www/chromium-uc/patches/extra/iridium-browser/updater-disable-auto-update.patch27
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-components-ungoogled.patch67
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-extra-channel-info.patch22
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch48
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch186
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch41
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch21
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch112
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch389
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch50
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch134
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tab-hover-cards.patch65
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch43
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch97
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch45
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch120
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch52
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch33
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch33
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch37
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch26
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch22
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch87
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-show-avatar-button.patch63
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch33
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch57
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-suggestions-url-field.patch461
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch76
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch25
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/disable-download-quarantine.patch296
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch27
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch16
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch25
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch13
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch13
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch79
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch32
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch42
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/fix-distilled-icons.patch14
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/keep-expired-flags.patch38
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch31
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch12
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/remove-uneeded-ui.patch282
62 files changed, 0 insertions, 4847 deletions
diff --git a/www/chromium-uc/patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch b/www/chromium-uc/patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch
deleted file mode 100644
index 2d6821f..0000000
--- a/www/chromium-uc/patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch
+++ /dev/null
@@ -1,325 +0,0 @@
1# Adds two flags:
2# 1. --fingerprinting-client-rects-noise to enable fingerprinting deception for Range::getClientRects and Element::getBoundingClientRect
3# 2. --fingerprinting-canvas-measuretext-noise to enable fingerprinting deception for Canvas::measureText
4# Tweaks based on https://github.com/bromite/bromite/blob/b1bc96bbd9ec549cf496e87f487a0ac35c83df0a/patches/BRM052_getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch
5# Originally based on https://github.com/Eloston/ungoogled-chromium/pull/377/commits/4151259b3248f0fc5c42fa262a1d1dd43c39fb60
6# chrome://flag setting added by ungoogled-chromium developers
7#
8# Unlike the latest Bromite patch, it was chosen to not regenerate the noise value each time the value is read to prevent potential efficiency issues with the load on the RNG.
9
10--- chrome/browser/BUILD.gn.orig
11+++ chrome/browser/BUILD.gn
12@@ -2370,6 +2370,7 @@ static_library("browser") {
13 "//third_party/libyuv",
14 "//third_party/metrics_proto",
15 "//third_party/re2",
16+ "//components/ungoogled:ungoogled_switches",
17 "//third_party/webrtc_overrides:webrtc_component",
18 "//third_party/widevine/cdm:buildflags",
19 "//third_party/widevine/cdm:headers",
20--- chrome/browser/about_flags.cc.orig
21+++ chrome/browser/about_flags.cc
22@@ -151,6 +151,7 @@
23 #include "components/translate/core/browser/translate_ranker_impl.h"
24 #include "components/translate/core/common/translate_util.h"
25 #include "components/ui_devtools/switches.h"
26+#include "components/ungoogled/ungoogled_switches.h"
27 #include "components/version_info/version_info.h"
28 #include "components/viz/common/features.h"
29 #include "components/viz/common/switches.h"
30--- chrome/browser/bromite_flag_entries.h.orig
31+++ chrome/browser/bromite_flag_entries.h
32@@ -4,4 +4,12 @@
33
34 #ifndef CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
35 #define CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
36+ {"fingerprinting-client-rects-noise",
37+ "Enable get*ClientRects() fingerprint deception",
38+ "Scale the output values of Range::getClientRects() and Element::getBoundingClientRect() 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.",
39+ kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingClientRectsNoise)},
40+ {"fingerprinting-canvas-measuretext-noise",
41+ "Enable Canvas::measureText() fingerprint deception",
42+ "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+ kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasMeasureTextNoise)},
44 #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
45--- content/browser/BUILD.gn.orig
46+++ content/browser/BUILD.gn
47@@ -222,6 +222,7 @@ source_set("browser") {
48 "//third_party/libyuv",
49 "//third_party/re2",
50 "//third_party/sqlite",
51+ "//components/ungoogled:ungoogled_switches",
52 "//third_party/webrtc_overrides:webrtc_component",
53 "//third_party/wtl",
54 "//third_party/zlib",
55--- content/browser/renderer_host/render_process_host_impl.cc.orig
56+++ content/browser/renderer_host/render_process_host_impl.cc
57@@ -68,6 +68,7 @@
58 #include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
59 #include "components/services/storage/public/mojom/indexed_db_control.mojom.h"
60 #include "components/tracing/common/tracing_switches.h"
61+#include "components/ungoogled/ungoogled_switches.h"
62 #include "components/viz/common/switches.h"
63 #include "components/viz/host/gpu_client.h"
64 #include "content/browser/bad_message.h"
65@@ -3465,6 +3466,8 @@ void RenderProcessHostImpl::PropagateBro
66 switches::kEnableWebGLDraftExtensions,
67 switches::kEnableWebGLImageChromium,
68 switches::kFileUrlPathAlias,
69+ switches::kFingerprintingClientRectsNoise,
70+ switches::kFingerprintingCanvasMeasureTextNoise,
71 switches::kForceDeviceScaleFactor,
72 switches::kForceDisplayColorProfile,
73 switches::kForceGpuMemAvailableMb,
74--- content/child/BUILD.gn.orig
75+++ content/child/BUILD.gn
76@@ -103,6 +103,7 @@ target(link_target_type, "child") {
77 "//third_party/blink/public/common",
78 "//third_party/blink/public/strings",
79 "//third_party/ced",
80+ "//components/ungoogled:ungoogled_switches",
81 "//third_party/zlib/google:compression_utils",
82 "//ui/base",
83 "//ui/events/blink",
84--- content/child/runtime_features.cc.orig
85+++ content/child/runtime_features.cc
86@@ -31,6 +31,7 @@
87 #include "third_party/blink/public/common/loader/referrer_utils.h"
88 #include "third_party/blink/public/common/switches.h"
89 #include "third_party/blink/public/platform/web_runtime_features.h"
90+#include "components/ungoogled/ungoogled_switches.h"
91 #include "ui/accessibility/accessibility_features.h"
92 #include "ui/base/ui_base_features.h"
93 #include "ui/events/blink/blink_features.h"
94@@ -466,6 +467,10 @@ void SetRuntimeFeaturesFromCommandLine(c
95 {wrf::EnableWebGPU, switches::kEnableUnsafeWebGPU, true},
96 {wrf::ForceOverlayFullscreenVideo, switches::kForceOverlayFullscreenVideo,
97 true},
98+ {wrf::EnableFingerprintingClientRectsNoise,
99+ switches::kFingerprintingClientRectsNoise, true},
100+ {wrf::EnableFingerprintingCanvasMeasureTextNoise,
101+ switches::kFingerprintingCanvasMeasureTextNoise, true},
102 };
103 for (const auto& mapping : switchToFeatureMapping) {
104 if (command_line.HasSwitch(mapping.switch_name))
105--- third_party/blink/public/platform/web_runtime_features.h.orig
106+++ third_party/blink/public/platform/web_runtime_features.h
107@@ -218,6 +218,8 @@ class WebRuntimeFeatures {
108 BLINK_PLATFORM_EXPORT static void EnableMediaControlsExpandGesture(bool);
109 BLINK_PLATFORM_EXPORT static void EnableGetDisplayMedia(bool);
110 BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool);
111+ BLINK_PLATFORM_EXPORT static void EnableFingerprintingClientRectsNoise(bool);
112+ BLINK_PLATFORM_EXPORT static void EnableFingerprintingCanvasMeasureTextNoise(bool);
113 BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch(
114 bool);
115 BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool);
116--- third_party/blink/renderer/core/dom/document.cc.orig
117+++ third_party/blink/renderer/core/dom/document.cc
118@@ -42,6 +42,7 @@
119 #include "base/containers/contains.h"
120 #include "base/debug/dump_without_crashing.h"
121 #include "base/metrics/histogram_functions.h"
122+#include "base/rand_util.h"
123 #include "base/time/time.h"
124 #include "cc/input/overscroll_behavior.h"
125 #include "cc/input/scroll_snap_data.h"
126@@ -855,6 +856,14 @@ Range* Document::CreateRangeAdjustedToTr
127 Position::BeforeNode(*shadow_host));
128 }
129
130+double Document::GetNoiseFactorX() {
131+ return noise_factor_x_;
132+}
133+
134+double Document::GetNoiseFactorY() {
135+ return noise_factor_y_;
136+}
137+
138 SelectorQueryCache& Document::GetSelectorQueryCache() {
139 if (!selector_query_cache_)
140 selector_query_cache_ = std::make_unique<SelectorQueryCache>();
141@@ -2145,6 +2154,15 @@ void Document::UpdateStyleAndLayoutTreeF
142 #if DCHECK_IS_ON()
143 AssertLayoutTreeUpdated(*this, true /* allow_dirty_container_subtrees */);
144 #endif
145+
146+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
147+ // Precompute -0.0003% to 0.0003% noise factor for get*ClientRect*() fingerprinting
148+ noise_factor_x_ = 1 + (base::RandDouble() - 0.5) * 0.000003;
149+ noise_factor_y_ = 1 + (base::RandDouble() - 0.5) * 0.000003;
150+ } else {
151+ noise_factor_x_ = 1;
152+ noise_factor_y_ = 1;
153+ }
154 }
155
156 void Document::InvalidateStyleAndLayoutForFontUpdates() {
157--- third_party/blink/renderer/core/dom/document.h.orig
158+++ third_party/blink/renderer/core/dom/document.h
159@@ -456,6 +456,10 @@ class CORE_EXPORT Document : public Cont
160 has_xml_declaration_ = has_xml_declaration ? 1 : 0;
161 }
162
163+ // Values for get*ClientRect fingerprint deception
164+ double GetNoiseFactorX();
165+ double GetNoiseFactorY();
166+
167 AtomicString visibilityState() const;
168 bool IsPageVisible() const;
169 bool hidden() const;
170@@ -2078,6 +2082,9 @@ class CORE_EXPORT Document : public Cont
171
172 base::ElapsedTimer start_time_;
173
174+ double noise_factor_x_;
175+ double noise_factor_y_;
176+
177 Member<ScriptRunner> script_runner_;
178
179 HeapVector<Member<ScriptElementBase>> current_script_stack_;
180--- third_party/blink/renderer/core/dom/element.cc.orig
181+++ third_party/blink/renderer/core/dom/element.cc
182@@ -2114,6 +2114,11 @@ DOMRectList* Element::getClientRects() {
183 DCHECK(element_layout_object);
184 GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom(
185 quads, *element_layout_object);
186+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
187+ for (FloatQuad& quad : quads) {
188+ quad.Scale(GetDocument().GetNoiseFactorX(), GetDocument().GetNoiseFactorY());
189+ }
190+ }
191 return MakeGarbageCollected<DOMRectList>(quads);
192 }
193
194@@ -2131,6 +2136,9 @@ FloatRect Element::GetBoundingClientRect
195 DCHECK(element_layout_object);
196 GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result,
197 *element_layout_object);
198+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
199+ result.Scale(GetDocument().GetNoiseFactorX(), GetDocument().GetNoiseFactorY());
200+ }
201 return result;
202 }
203
204--- third_party/blink/renderer/core/dom/range.cc.orig
205+++ third_party/blink/renderer/core/dom/range.cc
206@@ -1598,11 +1598,21 @@ DOMRectList* Range::getClientRects() con
207 Vector<FloatQuad> quads;
208 GetBorderAndTextQuads(quads);
209
210+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
211+ for (FloatQuad& quad : quads) {
212+ quad.Scale(owner_document_->GetNoiseFactorX(), owner_document_->GetNoiseFactorY());
213+ }
214+ }
215+
216 return MakeGarbageCollected<DOMRectList>(quads);
217 }
218
219 DOMRect* Range::getBoundingClientRect() const {
220- return DOMRect::FromFloatRect(BoundingRect());
221+ auto rect = BoundingRect();
222+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
223+ rect.Scale(owner_document_->GetNoiseFactorX(), owner_document_->GetNoiseFactorY());
224+ }
225+ return DOMRect::FromFloatRect(rect);
226 }
227
228 // TODO(editing-dev): We should make
229--- third_party/blink/renderer/core/html/canvas/text_metrics.cc.orig
230+++ third_party/blink/renderer/core/html/canvas/text_metrics.cc
231@@ -55,6 +55,24 @@ TextMetrics::TextMetrics(const Font& fon
232 Update(font, direction, baseline, align, text);
233 }
234
235+void TextMetrics::Shuffle(const double factor) {
236+ // x-direction
237+ width_ *= factor;
238+ actual_bounding_box_left_ *= factor;
239+ actual_bounding_box_right_ *= factor;
240+
241+ // y-direction
242+ font_bounding_box_ascent_ *= factor;
243+ font_bounding_box_descent_ *= factor;
244+ actual_bounding_box_ascent_ *= factor;
245+ actual_bounding_box_descent_ *= factor;
246+ em_height_ascent_ *= factor;
247+ em_height_descent_ *= factor;
248+ baselines_->setAlphabetic(baselines_->alphabetic() * factor);
249+ baselines_->setHanging(baselines_->hanging() * factor);
250+ baselines_->setIdeographic(baselines_->ideographic() * factor);
251+}
252+
253 void TextMetrics::Update(const Font& font,
254 const TextDirection& direction,
255 const TextBaseline& baseline,
256--- third_party/blink/renderer/core/html/canvas/text_metrics.h.orig
257+++ third_party/blink/renderer/core/html/canvas/text_metrics.h
258@@ -64,6 +64,8 @@ class CORE_EXPORT TextMetrics final : pu
259
260 void Trace(Visitor*) const override;
261
262+ void Shuffle(const double factor);
263+
264 private:
265 void Update(const Font&,
266 const TextDirection&,
267--- third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc.orig
268+++ third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc
269@@ -912,9 +912,15 @@ TextMetrics* CanvasRenderingContext2D::m
270 TextDirection direction =
271 ToTextDirection(GetState().GetDirection(), canvas());
272
273- return MakeGarbageCollected<TextMetrics>(font, direction,
274+ TextMetrics* text_metrics = MakeGarbageCollected<TextMetrics>(font, direction,
275 GetState().GetTextBaseline(),
276 GetState().GetTextAlign(), text);
277+
278+ // Scale text metrics if enabled
279+ if (RuntimeEnabledFeatures::FingerprintingCanvasMeasureTextNoiseEnabled()) {
280+ text_metrics->Shuffle(canvas()->GetDocument().GetNoiseFactorX());
281+ }
282+ return text_metrics;
283 }
284
285 void CanvasRenderingContext2D::fillFormattedText(
286--- third_party/blink/renderer/platform/BUILD.gn.orig
287+++ third_party/blink/renderer/platform/BUILD.gn
288@@ -1686,6 +1686,7 @@ component("platform") {
289 "//components/paint_preview/common",
290 "//components/power_scheduler",
291 "//components/search_engines:search_engine_utils",
292+ "//components/ungoogled:ungoogled_switches",
293 "//components/viz/client",
294 "//components/viz/common",
295 "//crypto",
296--- third_party/blink/renderer/platform/exported/web_runtime_features.cc.orig
297+++ third_party/blink/renderer/platform/exported/web_runtime_features.cc
298@@ -689,4 +689,12 @@ void WebRuntimeFeatures::EnableCLSScroll
299 RuntimeEnabledFeatures::SetCLSScrollAnchoringEnabled(enable);
300 }
301
302+void WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(bool enable) {
303+ RuntimeEnabledFeatures::SetFingerprintingClientRectsNoiseEnabled(enable);
304+}
305+
306+void WebRuntimeFeatures::EnableFingerprintingCanvasMeasureTextNoise(bool enable) {
307+ RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable);
308+}
309+
310 } // namespace blink
311--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig
312+++ third_party/blink/renderer/platform/runtime_enabled_features.json5
313@@ -1076,6 +1076,12 @@
314 origin_trial_feature_name: "Fledge",
315 },
316 {
317+ name: "FingerprintingClientRectsNoise",
318+ },
319+ {
320+ name: "FingerprintingCanvasMeasureTextNoise",
321+ },
322+ {
323 name: "FocuslessSpatialNavigation",
324 settable_from_internals: true,
325 },
diff --git a/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch b/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch
deleted file mode 100644
index 6ebc7a1..0000000
--- a/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch
+++ /dev/null
@@ -1,334 +0,0 @@
1# NOTE: Changes made:
2# * Added flag --fingerprinting-canvas-image-data-noise to enable/disable
3# Canvas image data fingerprinting deception
4# * Removed WebGLDebugRendererInfo disabling in favor of an alternative
5# implementation in ungoogled-chromium/disable-webgl-renderer-info.patch
6# * Tweak subchannel noise generation to require fewer random number generation
7From: csagan5 <32685696+csagan5@users.noreply.github.com>
8Date: Sat, 24 Mar 2018 05:18:03 +0100
9Subject: Canvas: fingerprinting mitigations for image data and webGL
10
11Disable webGL renderer info and modify the color data returned by ToBlob,
12ToDataURL and getImageData so that it will contain randomly manipulated
13pixels (maximum 10) that slightly change the color of the R,G,B components
14without a visible effect.
15
16Credits to Slaviro (https://github.com/Slaviro) for coming up with a better
17approach to change color components.
18---
19 .../platform/graphics/image_data_buffer.cc | 5 +
20 .../platform/graphics/static_bitmap_image.cc | 154 +++++++++++++++++++++
21 .../platform/graphics/static_bitmap_image.h | 2 +
22 4 files changed, 163 insertions(+), 2 deletions(-)
23
24--- chrome/browser/bromite_flag_entries.h.orig
25+++ chrome/browser/bromite_flag_entries.h
26@@ -16,4 +16,8 @@
27 flag_descriptions::kMaxConnectionsPerHostName,
28 flag_descriptions::kMaxConnectionsPerHostDescription,
29 kOsAll, MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)},
30+ {"fingerprinting-canvas-image-data-noise",
31+ "Enable Canvas image data fingerprint deception",
32+ "Slightly modifies at most 10 pixels in Canvas image data extracted via JS APIs. ungoogled-chromium flag, Bromite feature.",
33+ kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)},
34 #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
35--- content/browser/renderer_host/render_process_host_impl.cc.orig
36+++ content/browser/renderer_host/render_process_host_impl.cc
37@@ -3468,6 +3468,7 @@ void RenderProcessHostImpl::PropagateBro
38 switches::kFileUrlPathAlias,
39 switches::kFingerprintingClientRectsNoise,
40 switches::kFingerprintingCanvasMeasureTextNoise,
41+ switches::kFingerprintingCanvasImageDataNoise,
42 switches::kForceDeviceScaleFactor,
43 switches::kForceDisplayColorProfile,
44 switches::kForceGpuMemAvailableMb,
45--- content/child/runtime_features.cc.orig
46+++ content/child/runtime_features.cc
47@@ -471,6 +471,8 @@ void SetRuntimeFeaturesFromCommandLine(c
48 switches::kFingerprintingClientRectsNoise, true},
49 {wrf::EnableFingerprintingCanvasMeasureTextNoise,
50 switches::kFingerprintingCanvasMeasureTextNoise, true},
51+ {wrf::EnableFingerprintingCanvasImageDataNoise,
52+ switches::kFingerprintingCanvasImageDataNoise, true},
53 };
54 for (const auto& mapping : switchToFeatureMapping) {
55 if (command_line.HasSwitch(mapping.switch_name))
56--- third_party/blink/public/platform/web_runtime_features.h.orig
57+++ third_party/blink/public/platform/web_runtime_features.h
58@@ -220,6 +220,7 @@ class WebRuntimeFeatures {
59 BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool);
60 BLINK_PLATFORM_EXPORT static void EnableFingerprintingClientRectsNoise(bool);
61 BLINK_PLATFORM_EXPORT static void EnableFingerprintingCanvasMeasureTextNoise(bool);
62+ BLINK_PLATFORM_EXPORT static void EnableFingerprintingCanvasImageDataNoise(bool);
63 BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch(
64 bool);
65 BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool);
66--- third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc.orig
67+++ third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
68@@ -30,6 +30,7 @@
69 #include "third_party/blink/renderer/platform/graphics/bitmap_image.h"
70 #include "third_party/blink/renderer/platform/graphics/graphics_context.h"
71 #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h"
72+#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
73 #include "third_party/blink/renderer/platform/graphics/stroke_data.h"
74 #include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h"
75 #include "third_party/blink/renderer/platform/heap/heap.h"
76@@ -2311,6 +2312,9 @@ ImageData* BaseRenderingContext2D::getIm
77 snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds();
78 DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh)));
79 }
80+ if (read_pixels_successful && RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
81+ StaticBitmapImage::ShuffleSubchannelColorData(image_data_pixmap.addr(), image_data_pixmap.info(), sx, sy);
82+ }
83 }
84
85 return image_data;
86--- third_party/blink/renderer/platform/BUILD.gn.orig
87+++ third_party/blink/renderer/platform/BUILD.gn
88@@ -1645,7 +1645,9 @@ component("platform") {
89 "//third_party/blink/renderer:non_test_config",
90 ]
91
92- include_dirs = []
93+ include_dirs = [
94+ "//third_party/skia/include/private", # For shuffler in graphics/static_bitmap_image.cc
95+ ]
96
97 allow_circular_includes_from = [
98 "//third_party/blink/renderer/platform/blob",
99--- third_party/blink/renderer/platform/exported/web_runtime_features.cc.orig
100+++ third_party/blink/renderer/platform/exported/web_runtime_features.cc
101@@ -697,4 +697,8 @@ void WebRuntimeFeatures::EnableFingerpri
102 RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable);
103 }
104
105+void WebRuntimeFeatures::EnableFingerprintingCanvasImageDataNoise(bool enable) {
106+ RuntimeEnabledFeatures::SetFingerprintingCanvasImageDataNoiseEnabled(enable);
107+}
108+
109 } // namespace blink
110--- third_party/blink/renderer/platform/graphics/image_data_buffer.cc.orig
111+++ third_party/blink/renderer/platform/graphics/image_data_buffer.cc
112@@ -36,6 +36,8 @@
113
114 #include "base/compiler_specific.h"
115 #include "base/memory/ptr_util.h"
116+#include "base/rand_util.h"
117+#include "base/logging.h"
118 #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
119 #include "third_party/blink/renderer/platform/image-encoders/image_encoder.h"
120 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
121@@ -145,6 +147,11 @@ bool ImageDataBuffer::EncodeImageInterna
122 const SkPixmap& pixmap) const {
123 DCHECK(is_valid_);
124
125+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
126+ // shuffle subchannel color data within the pixmap
127+ StaticBitmapImage::ShuffleSubchannelColorData(pixmap_.writable_addr(), pixmap_.info(), 0, 0);
128+ }
129+
130 if (mime_type == kMimeTypeJpeg) {
131 SkJpegEncoder::Options options;
132 options.fQuality = ImageEncoder::ComputeJpegQuality(quality);
133--- third_party/blink/renderer/platform/graphics/static_bitmap_image.cc.orig
134+++ third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
135@@ -4,6 +4,8 @@
136
137 #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
138
139+#include "base/rand_util.h"
140+#include "base/logging.h"
141 #include "base/numerics/checked_math.h"
142 #include "gpu/command_buffer/client/gles2_interface.h"
143 #include "third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h"
144@@ -11,10 +13,12 @@
145 #include "third_party/blink/renderer/platform/graphics/image_observer.h"
146 #include "third_party/blink/renderer/platform/graphics/paint/paint_image.h"
147 #include "third_party/blink/renderer/platform/graphics/unaccelerated_static_bitmap_image.h"
148+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
149 #include "third_party/skia/include/core/SkCanvas.h"
150 #include "third_party/skia/include/core/SkImage.h"
151 #include "third_party/skia/include/core/SkPaint.h"
152 #include "third_party/skia/include/core/SkSurface.h"
153+#include "third_party/skia/include/private/SkColorData.h"
154 #include "v8/include/v8.h"
155
156 namespace blink {
157@@ -80,4 +84,154 @@ void StaticBitmapImage::DrawHelper(cc::P
158 WebCoreClampingModeToSkiaRectConstraint(draw_options.clamping_mode));
159 }
160
161+// set the component to maximum-delta if it is >= maximum, or add to existing color component (color + delta)
162+#define shuffleComponent(color, max, delta) ( (color) >= (max) ? ((max)-(delta)) : ((color)+(delta)) )
163+
164+#define writable_addr(T, p, stride, x, y) (T*)((const char *)p + y * stride + x * sizeof(T))
165+
166+void StaticBitmapImage::ShuffleSubchannelColorData(const void *addr, const SkImageInfo& info, int srcX, int srcY) {
167+ auto w = info.width() - srcX, h = info.height() - srcY;
168+
169+ // skip tiny images; info.width()/height() can also be 0
170+ if ((w < 8) || (h < 8)) {
171+ return;
172+ }
173+
174+ // generate the first random number here
175+ double shuffleX = base::RandDouble();
176+
177+ // cap maximum pixels to change
178+ auto pixels = (w + h) / 128;
179+ if (pixels > 10) {
180+ pixels = 10;
181+ } else if (pixels < 2) {
182+ pixels = 2;
183+ }
184+
185+ auto colorType = info.colorType();
186+ auto fRowBytes = info.minRowBytes(); // stride
187+
188+ DLOG(INFO) << "BRM: ShuffleSubchannelColorData() w=" << w << " h=" << h << " colorType=" << colorType << " fRowBytes=" << fRowBytes;
189+
190+ // second random number (for y/height)
191+ double shuffleY = base::RandDouble();
192+
193+ // calculate random coordinates using bisection
194+ auto currentW = w, currentH = h;
195+ for(;pixels >= 0; pixels--) {
196+ int x = currentW * shuffleX, y = currentH * shuffleY;
197+
198+ // calculate randomisation amounts for each RGB component
199+ uint8_t shuffleR = base::RandInt(0, 4);
200+ uint8_t shuffleG = (shuffleR + x) % 4;
201+ uint8_t shuffleB = (shuffleG + y) % 4;
202+
203+ // manipulate pixel data to slightly change the R, G, B components
204+ switch (colorType) {
205+ case kAlpha_8_SkColorType:
206+ {
207+ auto *pixel = writable_addr(uint8_t, addr, fRowBytes, x, y);
208+ auto r = SkColorGetR(*pixel), g = SkColorGetG(*pixel), b = SkColorGetB(*pixel), a = SkColorGetA(*pixel);
209+
210+ r = shuffleComponent(r, UINT8_MAX-1, shuffleR);
211+ g = shuffleComponent(g, UINT8_MAX-1, shuffleG);
212+ b = shuffleComponent(b, UINT8_MAX-1, shuffleB);
213+ // alpha is left unchanged
214+
215+ *pixel = SkColorSetARGB(a, r, g, b);
216+ }
217+ break;
218+ case kGray_8_SkColorType:
219+ {
220+ auto *pixel = writable_addr(uint8_t, addr, fRowBytes, x, y);
221+ *pixel = shuffleComponent(*pixel, UINT8_MAX-1, shuffleB);
222+ }
223+ break;
224+ case kRGB_565_SkColorType:
225+ {
226+ auto *pixel = writable_addr(uint16_t, addr, fRowBytes, x, y);
227+ unsigned r = SkPacked16ToR32(*pixel);
228+ unsigned g = SkPacked16ToG32(*pixel);
229+ unsigned b = SkPacked16ToB32(*pixel);
230+
231+ r = shuffleComponent(r, 31, shuffleR);
232+ g = shuffleComponent(g, 63, shuffleG);
233+ b = shuffleComponent(b, 31, shuffleB);
234+
235+ unsigned r16 = (r & SK_R16_MASK) << SK_R16_SHIFT;
236+ unsigned g16 = (g & SK_G16_MASK) << SK_G16_SHIFT;
237+ unsigned b16 = (b & SK_B16_MASK) << SK_B16_SHIFT;
238+
239+ *pixel = r16 | g16 | b16;
240+ }
241+ break;
242+ case kARGB_4444_SkColorType:
243+ {
244+ auto *pixel = writable_addr(uint16_t, addr, fRowBytes, x, y);
245+ auto a = SkGetPackedA4444(*pixel), r = SkGetPackedR4444(*pixel), g = SkGetPackedG4444(*pixel), b = SkGetPackedB4444(*pixel);
246+
247+ r = shuffleComponent(r, 15, shuffleR);
248+ g = shuffleComponent(g, 15, shuffleG);
249+ b = shuffleComponent(b, 15, shuffleB);
250+ // alpha is left unchanged
251+
252+ unsigned a4 = (a & 0xF) << SK_A4444_SHIFT;
253+ unsigned r4 = (r & 0xF) << SK_R4444_SHIFT;
254+ unsigned g4 = (g & 0xF) << SK_G4444_SHIFT;
255+ unsigned b4 = (b & 0xF) << SK_B4444_SHIFT;
256+
257+ *pixel = r4 | b4 | g4 | a4;
258+ }
259+ break;
260+ case kRGBA_8888_SkColorType:
261+ {
262+ auto *pixel = writable_addr(uint32_t, addr, fRowBytes, x, y);
263+ auto a = SkGetPackedA32(*pixel), r = SkGetPackedR32(*pixel), g = SkGetPackedG32(*pixel), b = SkGetPackedB32(*pixel);
264+
265+ r = shuffleComponent(r, UINT8_MAX-1, shuffleR);
266+ g = shuffleComponent(g, UINT8_MAX-1, shuffleG);
267+ b = shuffleComponent(b, UINT8_MAX-1, shuffleB);
268+ // alpha is left unchanged
269+
270+ *pixel = (a << SK_A32_SHIFT) | (r << SK_R32_SHIFT) |
271+ (g << SK_G32_SHIFT) | (b << SK_B32_SHIFT);
272+ }
273+ break;
274+ case kBGRA_8888_SkColorType:
275+ {
276+ auto *pixel = writable_addr(uint32_t, addr, fRowBytes, x, y);
277+ auto a = SkGetPackedA32(*pixel), b = SkGetPackedR32(*pixel), g = SkGetPackedG32(*pixel), r = SkGetPackedB32(*pixel);
278+
279+ r = shuffleComponent(r, UINT8_MAX-1, shuffleR);
280+ g = shuffleComponent(g, UINT8_MAX-1, shuffleG);
281+ b = shuffleComponent(b, UINT8_MAX-1, shuffleB);
282+ // alpha is left unchanged
283+
284+ *pixel = (a << SK_BGRA_A32_SHIFT) | (r << SK_BGRA_R32_SHIFT) |
285+ (g << SK_BGRA_G32_SHIFT) | (b << SK_BGRA_B32_SHIFT);
286+ }
287+ break;
288+ default:
289+ // the remaining formats are not expected to be used in Chromium
290+ LOG(WARNING) << "BRM: ShuffleSubchannelColorData(): Ignoring pixel format";
291+ return;
292+ }
293+
294+ // keep bisecting or reset current width/height as needed
295+ if (x == 0) {
296+ currentW = w;
297+ } else {
298+ currentW = x;
299+ }
300+ if (y == 0) {
301+ currentH = h;
302+ } else {
303+ currentH = y;
304+ }
305+ }
306+}
307+
308+#undef writable_addr
309+#undef shuffleComponent
310+
311 } // namespace blink
312--- third_party/blink/renderer/platform/graphics/static_bitmap_image.h.orig
313+++ third_party/blink/renderer/platform/graphics/static_bitmap_image.h
314@@ -36,6 +36,8 @@ class PLATFORM_EXPORT StaticBitmapImage
315
316 StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {}
317
318+ static void ShuffleSubchannelColorData(const void *addr, const SkImageInfo& info, int srcX, int srcY);
319+
320 bool IsStaticBitmapImage() const override { return true; }
321
322 // Methods overridden by all sub-classes
323--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig
324+++ third_party/blink/renderer/platform/runtime_enabled_features.json5
325@@ -1082,6 +1082,9 @@
326 name: "FingerprintingCanvasMeasureTextNoise",
327 },
328 {
329+ name: "FingerprintingCanvasImageDataNoise",
330+ },
331+ {
332 name: "FocuslessSpatialNavigation",
333 settable_from_internals: true,
334 },
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
deleted file mode 100644
index 65b1887..0000000
--- a/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch
+++ /dev/null
@@ -1,162 +0,0 @@
1From: csagan5 <32685696+csagan5@users.noreply.github.com>
2Date: Sun, 8 Jul 2018 22:42:04 +0200
3Subject: Add flag to configure maximum connections per host
4
5With the introduction of this flag it is possible to increase the maximum
6allowed connections per host; this can however be detrimental to devices
7with limited CPU/memory resources and it is disabled by default.
8---
9 chrome/browser/about_flags.cc | 8 ++++++++
10 chrome/browser/flag_descriptions.cc | 4 ++++
11 chrome/browser/flag_descriptions.h | 3 +++
12 .../common/network_features.cc | 3 +++
13 .../common/network_features.h | 4 ++++
14 .../common/network_switch_list.h | 4 ++++
15 net/socket/client_socket_pool_manager.cc | 16 ++++++++++++++++
16 7 files changed, 42 insertions(+)
17
18--- chrome/browser/BUILD.gn.orig
19+++ chrome/browser/BUILD.gn
20@@ -2126,6 +2126,7 @@ static_library("browser") {
21 "//components/net_log",
22 "//components/network_hints/common:mojo_bindings",
23 "//components/network_session_configurator/browser",
24+ "//components/network_session_configurator/common",
25 "//components/network_time",
26 "//components/no_state_prefetch/browser",
27 "//components/no_state_prefetch/common",
28--- chrome/browser/bromite_flag_choices.h.orig
29+++ chrome/browser/bromite_flag_choices.h
30@@ -4,4 +4,8 @@
31
32 #ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
33 #define CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
34+const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
35+ {features::kMaxConnectionsPerHostChoiceDefault, "", ""},
36+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"},
37+};
38 #endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
39--- chrome/browser/bromite_flag_entries.h.orig
40+++ chrome/browser/bromite_flag_entries.h
41@@ -12,4 +12,8 @@
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.",
44 kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasMeasureTextNoise)},
45+ {"max-connections-per-host",
46+ flag_descriptions::kMaxConnectionsPerHostName,
47+ flag_descriptions::kMaxConnectionsPerHostDescription,
48+ kOsAll, MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)},
49 #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
50--- chrome/browser/browser_process_impl.cc.orig
51+++ chrome/browser/browser_process_impl.cc
52@@ -19,12 +19,14 @@
53 #include "base/debug/leak_annotations.h"
54 #include "base/files/file_path.h"
55 #include "base/location.h"
56+#include "base/logging.h"
57 #include "base/macros.h"
58 #include "base/memory/ptr_util.h"
59 #include "base/metrics/histogram_macros.h"
60 #include "base/path_service.h"
61 #include "base/run_loop.h"
62 #include "base/single_thread_task_runner.h"
63+#include "base/strings/string_number_conversions.h"
64 #include "base/synchronization/waitable_event.h"
65 #include "base/task/task_traits.h"
66 #include "base/task/thread_pool.h"
67@@ -103,6 +105,7 @@
68 #include "components/metrics/metrics_service.h"
69 #include "components/metrics_services_manager/metrics_services_manager.h"
70 #include "components/metrics_services_manager/metrics_services_manager_client.h"
71+#include "components/network_session_configurator/common/network_switches.h"
72 #include "components/network_time/network_time_tracker.h"
73 #include "components/permissions/permissions_client.h"
74 #include "components/policy/core/common/policy_service.h"
75@@ -135,6 +138,7 @@
76 #include "media/media_buildflags.h"
77 #include "mojo/public/cpp/bindings/pending_receiver.h"
78 #include "net/log/net_log.h"
79+#include "net/socket/client_socket_pool_manager.h"
80 #include "ppapi/buildflags/buildflags.h"
81 #include "printing/buildflags/buildflags.h"
82 #include "services/network/public/cpp/features.h"
83@@ -345,6 +349,18 @@ void BrowserProcessImpl::Init() {
84 base::BindRepeating(&ApplyMetricsReportingPolicy));
85 #endif
86
87+ int max_connections_per_host = 0;
88+ auto switch_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
89+ switches::kMaxConnectionsPerHost);
90+ if (!switch_value.empty() && !base::StringToInt(switch_value, &max_connections_per_host)) {
91+ LOG(DFATAL) << "--" << switches::kMaxConnectionsPerHost
92+ << " expected integer; got (\"" << switch_value << "\" instead)";
93+ }
94+ if (max_connections_per_host != 0) {
95+ net::ClientSocketPoolManager::set_max_sockets_per_group(
96+ net::HttpNetworkSession::NORMAL_SOCKET_POOL, max_connections_per_host);
97+ }
98+
99 DCHECK(!webrtc_event_log_manager_);
100 webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance();
101
102--- chrome/browser/flag_descriptions.cc.orig
103+++ chrome/browser/flag_descriptions.cc
104@@ -1621,6 +1621,10 @@ const char kMediaHistoryDescription[] =
105 "Enables Media History which records data around media playbacks on "
106 "websites.";
107
108+const char kMaxConnectionsPerHostName[] = "Maximum connections per host";
109+const char kMaxConnectionsPerHostDescription[] =
110+ "Customize maximum allowed connections per host. ungoogled-chromium flag, Bromite feature.";
111+
112 const char kMediaRouterCastAllowAllIPsName[] =
113 "Connect to Cast devices on all IP addresses";
114 const char kMediaRouterCastAllowAllIPsDescription[] =
115--- chrome/browser/flag_descriptions.h.orig
116+++ chrome/browser/flag_descriptions.h
117@@ -930,6 +930,9 @@ extern const char kLogJsConsoleMessagesD
118 extern const char kMediaHistoryName[];
119 extern const char kMediaHistoryDescription[];
120
121+extern const char kMaxConnectionsPerHostName[];
122+extern const char kMaxConnectionsPerHostDescription[];
123+
124 extern const char kMediaRouterCastAllowAllIPsName[];
125 extern const char kMediaRouterCastAllowAllIPsDescription[];
126
127--- components/network_session_configurator/common/network_features.cc.orig
128+++ components/network_session_configurator/common/network_features.cc
129@@ -8,4 +8,7 @@
130
131 namespace features {
132
133+const char kMaxConnectionsPerHostChoiceDefault[] = "6",
134+ kMaxConnectionsPerHostChoice15[] = "15";
135+
136 } // namespace features
137--- components/network_session_configurator/common/network_features.h.orig
138+++ components/network_session_configurator/common/network_features.h
139@@ -10,6 +10,10 @@
140
141 namespace features {
142
143+NETWORK_SESSION_CONFIGURATOR_EXPORT extern const char kMaxConnectionsPerHostChoiceDefault[],
144+ kMaxConnectionsPerHostChoice6[],
145+ kMaxConnectionsPerHostChoice15[];
146+
147 } // namespace features
148
149 #endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_
150--- components/network_session_configurator/common/network_switch_list.h.orig
151+++ components/network_session_configurator/common/network_switch_list.h
152@@ -19,6 +19,10 @@ NETWORK_SWITCH(kEnableUserAlternateProto
153 // Enables the QUIC protocol. This is a temporary testing flag.
154 NETWORK_SWITCH(kEnableQuic, "enable-quic")
155
156+// Allows specifying a higher number of maximum connections per host
157+// (15 instead of 6, mirroring the value Mozilla uses).
158+NETWORK_SWITCH(kMaxConnectionsPerHost, "max-connections-per-host")
159+
160 // Ignores certificate-related errors.
161 NETWORK_SWITCH(kIgnoreCertificateErrors, "ignore-certificate-errors")
162
diff --git a/www/chromium-uc/patches/extra/debian/disable/google-api-warning.patch b/www/chromium-uc/patches/extra/debian/disable/google-api-warning.patch
deleted file mode 100644
index 1c9d44b..0000000
--- a/www/chromium-uc/patches/extra/debian/disable/google-api-warning.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1description: disable the google api key warning when those aren't found
2author: Michael Gilbert <mgilbert@debian.org>
3
4--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig
5+++ chrome/browser/ui/startup/startup_browser_creator_impl.cc
6@@ -672,9 +672,6 @@ void StartupBrowserCreatorImpl::AddInfoB
7 infobars::ContentInfoBarManager* infobar_manager =
8 infobars::ContentInfoBarManager::FromWebContents(web_contents);
9
10- if (!google_apis::HasAPIKeyConfigured())
11- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
12-
13 if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
14 PrefService* local_state = g_browser_process->local_state();
15 if (!local_state ||
diff --git a/www/chromium-uc/patches/extra/debian/disable/welcome-page.patch b/www/chromium-uc/patches/extra/debian/disable/welcome-page.patch
deleted file mode 100644
index 873aeae..0000000
--- a/www/chromium-uc/patches/extra/debian/disable/welcome-page.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1description: do not override the welcome page setting set in master_preferences
2author: Michael Gilbert <mgilbert@debian.org>
3bug-debian: http://bugs.debian.org/857767
4
5--- chrome/browser/profiles/profile_manager.cc.orig
6+++ chrome/browser/profiles/profile_manager.cc
7@@ -1310,7 +1310,7 @@ void ProfileManager::InitProfileUserPref
8 profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
9 supervised_user_id);
10 }
11-#if !defined(OS_ANDROID)
12+#if 0
13 // TODO(pmonette): Fix IsNewProfile() to handle the case where the profile is
14 // new even if the "Preferences" file already existed. (For example: The
15 // master_preferences file is dumped into the default profile on first run,
diff --git a/www/chromium-uc/patches/extra/debian/fixes/connection-message.patch b/www/chromium-uc/patches/extra/debian/fixes/connection-message.patch
deleted file mode 100644
index d9aaa94..0000000
--- a/www/chromium-uc/patches/extra/debian/fixes/connection-message.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1description: suggest proxy misconfiguration when network is unreachable
2author: Michael Gilbert <mgilbert@debian.org>
3bug-debian: http://bugs.debian.org/864539
4
5--- components/error_page_strings.grdp.orig
6+++ components/error_page_strings.grdp
7@@ -54,7 +54,7 @@
8 </message>
9 <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY" desc="When a page fails to load, sometimes we suggest checking the network connections. This contains details below the suggestion.">
10 Check any cables and reboot any routers, modems, or other network
11- devices you may be using.
12+ devices you may be using. Also check that any proxy server currently in use is reachable and configured correctly.
13 </message>
14 <if expr="not is_ios">
15 <message name="IDS_ERRORPAGES_SUGGESTION_SECURE_DNS_CONFIG_HEADER" desc="When a page fails to load, sometimes we suggest checking the secure DNS configuration. This is a header above above some details.">
diff --git a/www/chromium-uc/patches/extra/debian/gn/parallel.patch b/www/chromium-uc/patches/extra/debian/gn/parallel.patch
deleted file mode 100644
index ac0a2b0..0000000
--- a/www/chromium-uc/patches/extra/debian/gn/parallel.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1description: respect specified number of parallel jobs while bootstrapping gn
2author: Michael Gilbert <mgilbert@debian.org>
3
4--- tools/gn/bootstrap/bootstrap.py.orig
5+++ tools/gn/bootstrap/bootstrap.py
6@@ -47,6 +47,7 @@ def main(argv):
7 help='The directory in which to build gn, '
8 'relative to the src directory. (eg. out/Release)')
9 parser.add_option('-v', '--verbose', help='ignored')
10+ parser.add_option('-j', '--jobs', help='Number of jobs')
11 parser.add_option(
12 '--skip-generate-buildfiles',
13 action='store_true',
14@@ -121,8 +122,12 @@ def main(argv):
15
16 shutil.copy2(
17 os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
18- subprocess.check_call(
19- [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn'])
20+ if options.jobs:
21+ subprocess.check_call(
22+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', '-j'+str(options.jobs), 'gn'])
23+ else:
24+ subprocess.check_call(
25+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn'])
26 shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path)
27
28 if not options.skip_generate_buildfiles:
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0006-modify-default-prefs.patch b/www/chromium-uc/patches/extra/inox-patchset/0006-modify-default-prefs.patch
deleted file mode 100644
index d62ef29..0000000
--- a/www/chromium-uc/patches/extra/inox-patchset/0006-modify-default-prefs.patch
+++ /dev/null
@@ -1,199 +0,0 @@
1
2--- chrome/browser/background/background_mode_manager.cc.orig
3+++ chrome/browser/background/background_mode_manager.cc
4@@ -376,7 +376,7 @@ void BackgroundModeManager::RegisterPref
5 registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
6 registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
7 #endif
8- registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, true);
9+ registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, false);
10 }
11
12 void BackgroundModeManager::RegisterProfile(Profile* profile) {
13--- chrome/browser/chrome_content_browser_client.cc.orig
14+++ chrome/browser/chrome_content_browser_client.cc
15@@ -1238,7 +1238,7 @@ void ChromeContentBrowserClient::Registe
16 void ChromeContentBrowserClient::RegisterProfilePrefs(
17 user_prefs::PrefRegistrySyncable* registry) {
18 registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
19- registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, true);
20+ registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, false);
21 // Register user prefs for mapping SitePerProcess and IsolateOrigins in
22 // user policy in addition to the same named ones in Local State (which are
23 // used for mapping the command-line flags).
24--- chrome/browser/net/prediction_options.cc.orig
25+++ chrome/browser/net/prediction_options.cc
26@@ -31,7 +31,7 @@ NetworkPredictionStatus CanPrefetchAndPr
27 }
28 return NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK;
29 default:
30- DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
31+ //DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
32 return NetworkPredictionStatus::DISABLED_ALWAYS;
33 }
34 }
35--- chrome/browser/net/prediction_options.h.orig
36+++ chrome/browser/net/prediction_options.h
37@@ -22,7 +22,7 @@ enum NetworkPredictionOptions {
38 NETWORK_PREDICTION_ALWAYS,
39 NETWORK_PREDICTION_WIFI_ONLY,
40 NETWORK_PREDICTION_NEVER,
41- NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY,
42+ NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_NEVER,
43 };
44
45 enum class NetworkPredictionStatus {
46--- chrome/browser/net/profile_network_context_service.cc.orig
47+++ chrome/browser/net/profile_network_context_service.cc
48@@ -319,7 +319,7 @@ void ProfileNetworkContextService::Updat
49 void ProfileNetworkContextService::RegisterProfilePrefs(
50 user_prefs::PrefRegistrySyncable* registry) {
51 registry->RegisterBooleanPref(
52- embedder_support::kAlternateErrorPagesEnabled, true,
53+ embedder_support::kAlternateErrorPagesEnabled, false,
54 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
55 registry->RegisterBooleanPref(prefs::kQuicAllowed, true);
56 registry->RegisterBooleanPref(prefs::kGloballyScopeHTTPAuthCacheEnabled,
57--- chrome/browser/profiles/profile.cc.orig
58+++ chrome/browser/profiles/profile.cc
59@@ -276,7 +276,7 @@ const char Profile::kProfileKey[] = "__P
60 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
61 registry->RegisterBooleanPref(
62 prefs::kSearchSuggestEnabled,
63- true,
64+ false,
65 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
66 #if defined(OS_ANDROID)
67 registry->RegisterStringPref(
68--- chrome/browser/resources/settings/reset_page/reset_profile_dialog.html.orig
69+++ chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
70@@ -36,7 +36,7 @@
71 </cr-button>
72 </div>
73 <div slot="footer">
74- <cr-checkbox id="sendSettings" checked>
75+ <cr-checkbox id="sendSettings">
76 $i18nRaw{resetPageFeedback}</cr-checkbox>
77 </div>
78 </cr-dialog>
79--- chrome/browser/signin/account_consistency_mode_manager.cc.orig
80+++ chrome/browser/signin/account_consistency_mode_manager.cc
81@@ -111,7 +111,7 @@ AccountConsistencyModeManager::~AccountC
82 // static
83 void AccountConsistencyModeManager::RegisterProfilePrefs(
84 user_prefs::PrefRegistrySyncable* registry) {
85- registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, true);
86+ registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, false);
87 }
88
89 // static
90--- chrome/browser/ui/browser_ui_prefs.cc.orig
91+++ chrome/browser/ui/browser_ui_prefs.cc
92@@ -77,11 +77,11 @@ void RegisterBrowserUserPrefs(user_prefs
93 registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
94 registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
95 registry->RegisterBooleanPref(
96- translate::prefs::kOfferTranslateEnabled, true,
97+ translate::prefs::kOfferTranslateEnabled, false,
98 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
99 registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
100 registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true);
101- registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true);
102+ registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, false);
103 registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
104 registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup);
105 registry->RegisterDictionaryPref(prefs::kAppWindowPlacement);
106--- chrome/service/cloud_print/connector_settings.cc.orig
107+++ chrome/service/cloud_print/connector_settings.cc
108@@ -59,7 +59,7 @@ void ConnectorSettings::InitFrom(Service
109 DCHECK(server_url_.is_valid());
110
111 connect_new_printers_ = prefs->GetBoolean(
112- prefs::kCloudPrintConnectNewPrinters, true);
113+ prefs::kCloudPrintConnectNewPrinters, false);
114
115 xmpp_ping_enabled_ = prefs->GetBoolean(
116 prefs::kCloudPrintXmppPingEnabled, false);
117--- components/autofill/core/common/autofill_prefs.cc.orig
118+++ components/autofill/core/common/autofill_prefs.cc
119@@ -131,10 +131,10 @@ const char kAutocompleteLastVersionReten
120 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
121 // Synced prefs. Used for cross-device choices, e.g., credit card Autofill.
122 registry->RegisterBooleanPref(
123- prefs::kAutofillEnabledDeprecated, true,
124+ prefs::kAutofillEnabledDeprecated, false,
125 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
126 registry->RegisterBooleanPref(
127- prefs::kAutofillProfileEnabled, true,
128+ prefs::kAutofillProfileEnabled, false,
129 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
130 registry->RegisterIntegerPref(
131 prefs::kAutofillLastVersionDeduped, 0,
132@@ -147,7 +147,7 @@ void RegisterProfilePrefs(user_prefs::Pr
133 prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
134 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
135 registry->RegisterBooleanPref(
136- prefs::kAutofillCreditCardEnabled, true,
137+ prefs::kAutofillCreditCardEnabled, false,
138 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
139 registry->RegisterStringPref(
140 prefs::kAutofillProfileValidity, "",
141--- components/bookmarks/browser/bookmark_utils.cc.orig
142+++ components/bookmarks/browser/bookmark_utils.cc
143@@ -437,7 +437,7 @@ bool DoesBookmarkContainWords(const std:
144 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
145 registry->RegisterBooleanPref(
146 prefs::kShowBookmarkBar,
147- false,
148+ true,
149 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
150 registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true);
151 registry->RegisterBooleanPref(
152--- components/bookmarks/browser/features.cc.orig
153+++ components/bookmarks/browser/features.cc
154@@ -10,7 +10,7 @@ namespace features {
155 // Changes the apps shortcut on the bookmarks bar to default to off.
156 // https://crbug.com/1236793
157 const base::Feature kAppsShortcutDefaultOff{"AppsShortcutDefaultOff",
158- base::FEATURE_DISABLED_BY_DEFAULT};
159+ base::FEATURE_ENABLED_BY_DEFAULT};
160
161 } // namespace features
162 } // namespace bookmarks
163--- components/content_settings/core/browser/cookie_settings.cc.orig
164+++ components/content_settings/core/browser/cookie_settings.cc
165@@ -63,7 +63,7 @@ void CookieSettings::RegisterProfilePref
166 user_prefs::PrefRegistrySyncable* registry) {
167 registry->RegisterIntegerPref(
168 prefs::kCookieControlsMode,
169- static_cast<int>(CookieControlsMode::kIncognitoOnly),
170+ static_cast<int>(CookieControlsMode::kBlockThirdParty),
171 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
172 }
173
174--- components/password_manager/core/browser/password_manager.cc.orig
175+++ components/password_manager/core/browser/password_manager.cc
176@@ -204,10 +204,10 @@ bool HasMutedCredentials(base::span<cons
177 void PasswordManager::RegisterProfilePrefs(
178 user_prefs::PrefRegistrySyncable* registry) {
179 registry->RegisterBooleanPref(
180- prefs::kCredentialsEnableService, true,
181+ prefs::kCredentialsEnableService, false,
182 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
183 registry->RegisterBooleanPref(
184- prefs::kCredentialsEnableAutosignin, true,
185+ prefs::kCredentialsEnableAutosignin, false,
186 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
187 registry->RegisterStringPref(prefs::kSyncPasswordHash, std::string(),
188 PrefRegistry::NO_REGISTRATION_FLAGS);
189--- components/payments/core/payment_prefs.cc.orig
190+++ components/payments/core/payment_prefs.cc
191@@ -16,7 +16,7 @@ const char kCanMakePaymentEnabled[] = "p
192 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
193 registry->RegisterBooleanPref(kPaymentsFirstTransactionCompleted, false);
194 registry->RegisterBooleanPref(
195- kCanMakePaymentEnabled, true,
196+ kCanMakePaymentEnabled, false,
197 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
198 }
199
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch b/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch
deleted file mode 100644
index 9d21b6f..0000000
--- a/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1--- chrome/browser/search/search.cc.orig
2+++ chrome/browser/search/search.cc
3@@ -182,26 +182,7 @@ struct NewTabURLDetails {
4 : chrome::kChromeUINewTabPageThirdPartyURL);
5 #endif
6
7- if (ShouldShowLocalNewTab(profile))
8- return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
9-
10- const TemplateURL* template_url =
11- GetDefaultSearchProviderTemplateURL(profile);
12- if (!profile || !template_url)
13- return NewTabURLDetails(local_url, NEW_TAB_URL_BAD);
14-
15- GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms(
16- TemplateURLRef::SearchTermsArgs(std::u16string()),
17- UIThreadSearchTermsData()));
18-
19- if (!search_provider_url.is_valid())
20- return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET);
21- if (!search_provider_url.SchemeIsCryptographic())
22- return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE);
23- if (!IsURLAllowedForSupervisedUser(search_provider_url, profile))
24- return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED);
25-
26- return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID);
27+ return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
28 }
29
30 const GURL url;
31--- components/ntp_snippets/features.cc.orig
32+++ components/ntp_snippets/features.cc
33@@ -39,7 +39,7 @@ const base::Feature* const kAllFeatures[
34 &kOptionalImagesEnabledFeature};
35
36 const base::Feature kArticleSuggestionsFeature{
37- "NTPArticleSuggestions", base::FEATURE_ENABLED_BY_DEFAULT};
38+ "NTPArticleSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
39
40 const base::Feature kRemoteSuggestionsEmulateM58FetchingSchedule{
41 "RemoteSuggestionsEmulateM58FetchingSchedule",
42@@ -69,10 +69,10 @@ const char kNotificationsDailyLimit[] =
43 const char kNotificationsIgnoredLimitParam[] = "ignored_limit";
44
45 const base::Feature kKeepPrefetchedContentSuggestions{
46- "KeepPrefetchedContentSuggestions", base::FEATURE_ENABLED_BY_DEFAULT};
47+ "KeepPrefetchedContentSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
48
49 const base::Feature kOptionalImagesEnabledFeature{
50- "NTPRemoteSuggestionsOptionalImages", base::FEATURE_ENABLED_BY_DEFAULT};
51+ "NTPRemoteSuggestionsOptionalImages", base::FEATURE_DISABLED_BY_DEFAULT};
52
53 std::vector<const base::Feature*> GetAllFeatures() {
54 // Skip the last feature as it's a nullptr.
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0013-disable-missing-key-warning.patch b/www/chromium-uc/patches/extra/inox-patchset/0013-disable-missing-key-warning.patch
deleted file mode 100644
index 0b14cd8..0000000
--- a/www/chromium-uc/patches/extra/inox-patchset/0013-disable-missing-key-warning.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1--- chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc.orig
2+++ chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
3@@ -17,9 +17,6 @@
4 // static
5 void GoogleApiKeysInfoBarDelegate::Create(
6 infobars::ContentInfoBarManager* infobar_manager) {
7- infobar_manager->AddInfoBar(
8- CreateConfirmInfoBar(std::unique_ptr<ConfirmInfoBarDelegate>(
9- new GoogleApiKeysInfoBarDelegate())));
10 }
11
12 GoogleApiKeysInfoBarDelegate::GoogleApiKeysInfoBarDelegate()
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch b/www/chromium-uc/patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch
deleted file mode 100644
index ff72a53..0000000
--- a/www/chromium-uc/patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1--- sandbox/linux/BUILD.gn.orig
2+++ sandbox/linux/BUILD.gn
3@@ -327,6 +327,12 @@ if (is_linux || is_chromeos) {
4 # These files have a suspicious comparison.
5 # TODO fix this and re-enable this warning.
6 "-Wno-sign-compare",
7+
8+ "-fPIE",
9+ ]
10+
11+ ldflags = [
12+ "-pie",
13 ]
14 }
15 }
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch b/www/chromium-uc/patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch
deleted file mode 100644
index 4790f65..0000000
--- a/www/chromium-uc/patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- chrome/browser/ui/startup/startup_tab_provider.cc.orig
2+++ chrome/browser/ui/startup/startup_tab_provider.cc
3@@ -105,7 +105,7 @@ bool ValidateUrl(const GURL& url) {
4
5 StartupTabs StartupTabProviderImpl::GetOnboardingTabs(Profile* profile) const {
6 // Chrome OS has its own welcome flow provided by OOBE.
7-#if BUILDFLAG(IS_CHROMEOS_ASH)
8+#if 1
9 return StartupTabs();
10 #else
11 if (!profile)
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0019-disable-battery-status-service.patch b/www/chromium-uc/patches/extra/inox-patchset/0019-disable-battery-status-service.patch
deleted file mode 100644
index ded3df9..0000000
--- a/www/chromium-uc/patches/extra/inox-patchset/0019-disable-battery-status-service.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1--- services/device/battery/battery_status_service.cc.orig
2+++ services/device/battery/battery_status_service.cc
3@@ -22,10 +22,7 @@ BatteryStatusService::BatteryStatusServi
4 update_callback_(
5 base::BindRepeating(&BatteryStatusService::NotifyConsumers,
6 base::Unretained(this))),
7- status_updated_(false),
8 is_shutdown_(false) {
9- callback_list_.set_removal_callback(base::BindRepeating(
10- &BatteryStatusService::ConsumersChanged, base::Unretained(this)));
11 }
12
13 BatteryStatusService::~BatteryStatusService() = default;
14@@ -40,58 +37,16 @@ base::CallbackListSubscription BatterySt
15 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
16 DCHECK(!is_shutdown_);
17
18- if (!battery_fetcher_)
19- battery_fetcher_ = BatteryStatusManager::Create(update_callback_);
20-
21- if (callback_list_.empty()) {
22- bool success = battery_fetcher_->StartListeningBatteryChange();
23- // On failure pass the default values back.
24- if (!success)
25- callback.Run(mojom::BatteryStatus());
26- }
27-
28- if (status_updated_) {
29- // Send recent status to the new callback if already available.
30- callback.Run(status_);
31- }
32+ // Always pass the default values.
33+ callback.Run(mojom::BatteryStatus());
34
35 return callback_list_.Add(callback);
36 }
37
38-void BatteryStatusService::ConsumersChanged() {
39- if (is_shutdown_)
40- return;
41-
42- if (callback_list_.empty()) {
43- battery_fetcher_->StopListeningBatteryChange();
44- status_updated_ = false;
45- }
46-}
47-
48 void BatteryStatusService::NotifyConsumers(const mojom::BatteryStatus& status) {
49- DCHECK(!is_shutdown_);
50-
51- main_thread_task_runner_->PostTask(
52- FROM_HERE,
53- base::BindOnce(&BatteryStatusService::NotifyConsumersOnMainThread,
54- base::Unretained(this), status));
55-}
56-
57-void BatteryStatusService::NotifyConsumersOnMainThread(
58- const mojom::BatteryStatus& status) {
59- DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
60- if (callback_list_.empty())
61- return;
62-
63- status_ = status;
64- status_updated_ = true;
65- callback_list_.Notify(status_);
66 }
67
68 void BatteryStatusService::Shutdown() {
69- if (!callback_list_.empty())
70- battery_fetcher_->StopListeningBatteryChange();
71- battery_fetcher_.reset();
72 is_shutdown_ = true;
73 }
74
75@@ -102,9 +57,6 @@ BatteryStatusService::GetUpdateCallbackF
76
77 void BatteryStatusService::SetBatteryManagerForTesting(
78 std::unique_ptr<BatteryStatusManager> test_battery_manager) {
79- battery_fetcher_ = std::move(test_battery_manager);
80- status_ = mojom::BatteryStatus();
81- status_updated_ = false;
82 is_shutdown_ = false;
83 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get();
84 }
85--- services/device/battery/battery_status_service.h.orig
86+++ services/device/battery/battery_status_service.h
87@@ -60,15 +60,10 @@ class BatteryStatusService {
88 // Updates current battery status and sends new status to interested
89 // render processes. Can be called on any thread via a callback.
90 void NotifyConsumers(const mojom::BatteryStatus& status);
91- void NotifyConsumersOnMainThread(const mojom::BatteryStatus& status);
92- void ConsumersChanged();
93
94 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
95- std::unique_ptr<BatteryStatusManager> battery_fetcher_;
96 BatteryUpdateCallbackList callback_list_;
97 BatteryUpdateCallback update_callback_;
98- mojom::BatteryStatus status_;
99- bool status_updated_;
100 bool is_shutdown_;
101 };
102
diff --git a/www/chromium-uc/patches/extra/iridium-browser/Remove-EV-certificates.patch b/www/chromium-uc/patches/extra/iridium-browser/Remove-EV-certificates.patch
deleted file mode 100644
index 8f794fe..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/Remove-EV-certificates.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From d32e222a2706cb59f9855b9cf4330f88d1af5435 Mon Sep 17 00:00:00 2001
2From: Jan Engelhardt <jengelh@inai.de>
3Date: Thu, 2 Apr 2015 12:44:23 +0200
4Subject: [PATCH 41/66] Remove EV certificates
5
6The team chose to let EV certificates appear just like normal
7certificates. The web of trust is considered a failure in itself, so
8do not give users a false sense of extra security with EV certs.
9Instead, let them appear just like regular ones.
10---
11 net/cert/ev_root_ca_metadata.cc | 14 +++++++++++++-
12 1 file changed, 13 insertions(+), 1 deletion(-)
13
14--- net/cert/ev_root_ca_metadata.cc.orig
15+++ net/cert/ev_root_ca_metadata.cc
16@@ -41,6 +41,16 @@ struct EVMetadata {
17
18 // These certificates may be found in net/data/ssl/ev_roots.
19 static const EVMetadata kEvRootCaMetadata[] = {
20+ // need some dummy thing to make compiler happy, because
21+ // arraysize() is implemented as a convoluted template rather than
22+ // the traditional sizeof(x)/sizeof(*x)
23+ { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
24+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } },
25+ {
26+ "0",
27+ }
28+ },
29+#if 0
30 // AC Camerfirma S.A. Chambers of Commerce Root - 2008
31 // https://www.camerfirma.com
32 {
33@@ -590,7 +600,9 @@ static const EVMetadata kEvRootCaMetadat
34 0xd2, 0x09, 0xb7, 0x37, 0xcb, 0xe2, 0xc1, 0x8c, 0xfb, 0x2c, 0x10,
35 0xc0, 0xff, 0x0b, 0xcf, 0x0d, 0x32, 0x86, 0xfc, 0x1a, 0xa2}},
36 {"2.16.840.1.114404.1.1.2.4.1", ""},
37- }};
38+ }
39+#endif
40+};
41
42 #endif // defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
43 } // namespace
diff --git a/www/chromium-uc/patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch b/www/chromium-uc/patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch
deleted file mode 100644
index 0072e8f..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1From 7134d5fd762237ad2d80093b68ccbd1582476640 Mon Sep 17 00:00:00 2001
2From: Joachim Bauch <jojo@struktur.de>
3Date: Thu, 25 Jun 2015 15:51:59 +0200
4Subject: [PATCH 56/66] browser: disable profile auto-import on first run
5
6---
7 chrome/browser/chrome_browser_main.cc | 2 --
8 1 file changed, 2 deletions(-)
9
10--- chrome/browser/chrome_browser_main.cc.orig
11+++ chrome/browser/chrome_browser_main.cc
12@@ -1492,8 +1492,6 @@ int ChromeBrowserMainParts::PreMainMessa
13 // and preferences have been registered since some of the import code depends
14 // on preferences.
15 if (first_run::IsChromeFirstRun()) {
16- first_run::AutoImport(profile_, master_prefs_->import_bookmarks_path);
17-
18 // Note: This can pop-up the first run consent dialog on Linux & Mac.
19 first_run::DoPostImportTasks(profile_,
20 master_prefs_->make_chrome_default_for_user);
diff --git a/www/chromium-uc/patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch b/www/chromium-uc/patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
deleted file mode 100644
index a6eab74..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1From d3dcad96b3c2091026c3a81054bb3ce56538a702 Mon Sep 17 00:00:00 2001
2From: Jan Engelhardt <jengelh@inai.de>
3Date: Thu, 29 Jan 2015 10:46:40 +0100
4Subject: [PATCH 16/66] mime_util: force text/x-suse-ymp to be downloaded
5
6YMP files (YaST One Click Install) are plaintext XML, but also not
7very interesting in themselves. Force them to be stored.
8---
9 components/mime_util/mime_util.cc | 1 +
10 1 file changed, 1 insertion(+)
11
12--- third_party/blink/common/mime_util/mime_util.cc.orig
13+++ third_party/blink/common/mime_util/mime_util.cc
14@@ -83,6 +83,7 @@ static const char* const kUnsupportedTex
15 "text/x-csv",
16 "text/x-vcf",
17 "text/rtf",
18+ "text/x-suse-ymp",
19 "text/comma-separated-values",
20 "text/csv",
21 "text/tab-separated-values",
diff --git a/www/chromium-uc/patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch b/www/chromium-uc/patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch
deleted file mode 100644
index 394a6da..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1From 088a50b2fc66418294166b61f31925426b1a9c54 Mon Sep 17 00:00:00 2001
2From: Jan Engelhardt <jengelh@inai.de>
3Date: Mon, 15 Sep 2014 10:52:32 +0200
4Subject: [PATCH 12/66] net/cert: increase default key length for
5 newly-generated RSA keys
6
7Should we add something for chrome://settings, or just leave
8it as hidden as it was before?
9---
10 net/cert/x509_util.cc | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13--- net/cert/x509_util.cc.orig
14+++ net/cert/x509_util.cc
15@@ -241,7 +241,7 @@ bool GetTLSServerEndPointChannelBinding(
16 }
17
18 // RSA keys created by CreateKeyAndSelfSignedCert will be of this length.
19-static const uint16_t kRSAKeyLength = 1024;
20+static const uint16_t kRSAKeyLength = 2048;
21
22 // Certificates made by CreateKeyAndSelfSignedCert will be signed using this
23 // digest algorithm.
diff --git a/www/chromium-uc/patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch b/www/chromium-uc/patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch
deleted file mode 100644
index beb8b0b..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 93010fd16c1c9f01a06eab18055bcab54b028cc8 Mon Sep 17 00:00:00 2001
2From: Jan Engelhardt <jengelh@inai.de>
3Date: Fri, 13 Feb 2015 01:04:21 +0100
4Subject: [PATCH 28/66] prefs: always prompt for download directory by default
5
6If the user opens a link, one of two things might happen. The URI
7resolves to a "web page" and will be displayed, then everything is
8good. Or it has a MIME type like application/* or so that causes the
9browser to consider it a file download instead.
10
11In that case, one of two things might happen. The browser may display
12a dialog box asking explicitly for an action, then everything is
13good. Or it does not and instead readily stores the file on disk.
14
15(Modern browsers also download the file in the background when waiting
16for the dialog box confirmation, but that is a separate tuning knob.)
17
18When the file is chosen to be immediately stored on disk without user
19interaction, the visual feedback for this may be rather miniscule.
20
21And then, you have to open a terminal or file manager again just to
22move the file to the location you wanted it to be in in the first
23place.
24
25TLDR: Do not let files sneak onto the disk too easily.
26---
27 chrome/browser/download/download_prefs.cc | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30--- chrome/browser/download/download_prefs.cc.orig
31+++ chrome/browser/download/download_prefs.cc
32@@ -271,7 +271,7 @@ void DownloadPrefs::RegisterProfilePrefs
33 user_prefs::PrefRegistrySyncable* registry) {
34 registry->RegisterBooleanPref(
35 prefs::kPromptForDownload,
36- false,
37+ true,
38 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
39 registry->RegisterStringPref(prefs::kDownloadExtensionsToOpen, std::string());
40 registry->RegisterListPref(prefs::kDownloadExtensionsToOpenByPolicy, {});
diff --git a/www/chromium-uc/patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch b/www/chromium-uc/patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch
deleted file mode 100644
index 01696b7..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1From 0839326fb1b7ff7937cee0efa45f5a4ba23c2f78 Mon Sep 17 00:00:00 2001
2From: Jan Engelhardt <jengelh@inai.de>
3Date: Sat, 13 Sep 2014 17:25:47 +0200
4Subject: [PATCH 27/66] prefs: only keep cookies until exit
5
6Out with all those tracking cookies!
7---
8 components/content_settings/core/browser/content_settings_registry.cc | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11--- components/content_settings/core/browser/content_settings_registry.cc.orig
12+++ components/content_settings/core/browser/content_settings_registry.cc
13@@ -126,7 +126,7 @@ void ContentSettingsRegistry::Init() {
14 // WARNING: The string names of the permissions passed in below are used to
15 // generate preference names and should never be changed!
16
17- Register(ContentSettingsType::COOKIES, "cookies", CONTENT_SETTING_ALLOW,
18+ Register(ContentSettingsType::COOKIES, "cookies", CONTENT_SETTING_SESSION_ONLY,
19 WebsiteSettingsInfo::SYNCABLE,
20 AllowlistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
21 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
diff --git a/www/chromium-uc/patches/extra/iridium-browser/updater-disable-auto-update.patch b/www/chromium-uc/patches/extra/iridium-browser/updater-disable-auto-update.patch
deleted file mode 100644
index a6be904..0000000
--- a/www/chromium-uc/patches/extra/iridium-browser/updater-disable-auto-update.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From f97af1715c10c5926169ff317ca7c91f1d073af9 Mon Sep 17 00:00:00 2001
2From: Jan Engelhardt <jengelh@inai.de>
3Date: Fri, 13 Feb 2015 00:59:04 +0100
4Subject: [PATCH 39/66] updater: disable auto-update
5
6As per http://www.chromium.org/administrators/turning-off-auto-updates ,
7the auto update function is decidedly disabled on Linux, i.e.
8the following patch is for Windows and MacOS.
9
10For Windows, all we need is to build without -DGOOGLE_CHROME_BUILD (cf.
11chrome/installer/util/google_update_settings.cc), which may already be
12the case anyway, since we are based off Chromium, not Chrome.
13---
14 chrome/browser/app_controller_mac.mm | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17--- chrome/browser/app_controller_mac.mm.orig
18+++ chrome/browser/app_controller_mac.mm
19@@ -866,7 +866,7 @@ static base::mac::ScopedObjCClassSwizzle
20 CFStringRef checkInterval = CFSTR("checkInterval");
21 CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app);
22 if (!plist) {
23- const float fiveHoursInSeconds = 5.0 * 60.0 * 60.0;
24+ const float fiveHoursInSeconds = 0.0;
25 NSNumber* value = [NSNumber numberWithFloat:fiveHoursInSeconds];
26 CFPreferencesSetAppValue(checkInterval, value, app);
27 CFPreferencesAppSynchronize(app);
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-components-ungoogled.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-components-ungoogled.patch
deleted file mode 100644
index 167eaec..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-components-ungoogled.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1# Add ungoogled-chromium-specific code to components/ungoogled/
2
3--- /dev/null
4+++ components/ungoogled/BUILD.gn
5@@ -0,0 +1,14 @@
6+# Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
7+# Use of this source code is governed by a BSD-style license that can be
8+# found in the LICENSE file.
9+
10+component("ungoogled_switches") {
11+ sources = [
12+ "ungoogled_switches.h",
13+ "ungoogled_switches.cc",
14+ ]
15+
16+ defines = [ "IS_UNGOOGLED_IMPL" ]
17+
18+ deps = [ "//base" ]
19+}
20--- /dev/null
21+++ components/ungoogled/ungoogled_switches.cc
22@@ -0,0 +1,21 @@
23+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
24+// Use of this source code is governed by a BSD-style license that can be
25+// found in the LICENSE file.
26+
27+#include "components/ungoogled/ungoogled_switches.h"
28+
29+namespace switches {
30+
31+// Enable fingerprinting deception for getClientRects and getBoundingClientRect
32+const char kFingerprintingClientRectsNoise[] = "fingerprinting-client-rects-noise";
33+
34+// Enable fingerprinting deception for measureText
35+const char kFingerprintingCanvasMeasureTextNoise[] = "fingerprinting-canvas-measuretext-noise";
36+
37+// Enable fingerprinting deception for Canvas image data
38+const char kFingerprintingCanvasImageDataNoise[] = "fingerprinting-canvas-image-data-noise";
39+
40+// Set PDF Plugin name, for websites that analyze JavaScript API navigator.plugins
41+const char kPDFPluginName[] = "pdf-plugin-name";
42+
43+} // namespace switches
44--- /dev/null
45+++ components/ungoogled/ungoogled_switches.h
46@@ -0,0 +1,21 @@
47+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
48+// Use of this source code is governed by a BSD-style license that can be
49+// found in the LICENSE file.
50+
51+// Defines all the fingerprinting command-line switches.
52+
53+#ifndef THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_
54+#define THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_
55+
56+#include "base/component_export.h"
57+
58+namespace switches {
59+
60+COMPONENT_EXPORT(UNGOOGLED) extern const char kFingerprintingClientRectsNoise[];
61+COMPONENT_EXPORT(UNGOOGLED) extern const char kFingerprintingCanvasMeasureTextNoise[];
62+COMPONENT_EXPORT(UNGOOGLED) extern const char kFingerprintingCanvasImageDataNoise[];
63+COMPONENT_EXPORT(UNGOOGLED) extern const char kPDFPluginName[];
64+
65+}
66+
67+#endif // THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-extra-channel-info.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-extra-channel-info.patch
deleted file mode 100644
index 6df493e..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-extra-channel-info.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1description: change extra channel info to "Ungoogled Chromium"
2author: Wengling Chen <feiyu2817@gmail.com>
3
4---
5 components/version_ui_strings.grdp | 4 ++--
6 1 file changed, 2 insertions(+), 2 deletions(-)
7
8--- components/version_ui_strings.grdp.orig
9+++ components/version_ui_strings.grdp
10@@ -4,10 +4,10 @@
11 About Version
12 </message>
13 <message name="IDS_VERSION_UI_OFFICIAL" desc="official build on the about:version page">
14- Official Build
15+ Official Build, ungoogled-chromium
16 </message>
17 <message name="IDS_VERSION_UI_UNOFFICIAL" desc="unofficial build on the about:version page">
18- Developer Build
19+ Developer Build, ungoogled-chromium
20 </message>
21 <message name="IDS_VERSION_UI_32BIT" desc="32-bit on the chrome://version page">
22 (32-bit)
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch
deleted file mode 100644
index 0d622e8..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1--- chrome/browser/ui/bookmarks/bookmark_tab_helper.cc.orig
2+++ chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
3@@ -4,6 +4,7 @@
4
5 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
6
7+#include "base/command_line.h"
8 #include "base/observer_list.h"
9 #include "build/build_config.h"
10 #include "build/chromeos_buildflags.h"
11@@ -71,10 +72,12 @@ bool BookmarkTabHelper::ShouldShowBookma
12 !prefs->GetBoolean(bookmarks::prefs::kShowBookmarkBar))
13 return false;
14
15+ const std::string flag_value =
16+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("bookmark-bar-ntp");
17 // The bookmark bar is only shown on the NTP if the user
18 // has added something to it.
19 return IsNTP(web_contents()) && bookmark_model_ &&
20- bookmark_model_->HasBookmarks();
21+ bookmark_model_->HasBookmarks() && (flag_value != "never");
22 }
23
24 void BookmarkTabHelper::AddObserver(BookmarkTabHelperObserver* observer) {
25--- chrome/browser/ungoogled_flag_choices.h.orig
26+++ chrome/browser/ungoogled_flag_choices.h
27@@ -39,4 +39,10 @@ const FeatureEntry::Choice kPDFPluginNam
28 {"Google Chrome", switches::kPDFPluginName, "chrome"},
29 {"Microsoft Edge", switches::kPDFPluginName, "edge"},
30 };
31+const FeatureEntry::Choice kBookmarkBarNewTab[] = {
32+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
33+ {"Never",
34+ "bookmark-bar-ntp",
35+ "never"},
36+};
37 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
38--- chrome/browser/ungoogled_flag_entries.h.orig
39+++ chrome/browser/ungoogled_flag_entries.h
40@@ -44,4 +44,8 @@
41 "Set internal PDF plugin name",
42 "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.",
43 kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)},
44+ {"bookmark-bar-ntp",
45+ "Bookmark Bar on New-Tab-Page",
46+ "Disable the Bookmark Bar on the New-Tab-Page. ungoogled-chromium flag.",
47+ kOsDesktop, MULTI_VALUE_TYPE(kBookmarkBarNewTab)},
48 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch
deleted file mode 100644
index 56dc7e2..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch
+++ /dev/null
@@ -1,186 +0,0 @@
1--- chrome/browser/ui/browser.cc.orig
2+++ chrome/browser/ui/browser.cc
3@@ -140,6 +140,8 @@
4 #include "chrome/browser/ui/tabs/tab_strip_model.h"
5 #include "chrome/browser/ui/tabs/tab_utils.h"
6 #include "chrome/browser/ui/ui_features.h"
7+#include "chrome/browser/ui/views/frame/browser_view.h"
8+#include "chrome/browser/ui/views/message_box_dialog.h"
9 #include "chrome/browser/ui/web_applications/app_browser_controller.h"
10 #include "chrome/browser/ui/web_applications/web_app_launch_utils.h"
11 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
12@@ -467,6 +469,7 @@ Browser::Browser(const CreateParams& par
13 omit_from_session_restore_(params.omit_from_session_restore),
14 should_trigger_session_restore_(params.should_trigger_session_restore),
15 cancel_download_confirmation_state_(NOT_PROMPTED),
16+ close_multitab_confirmation_state_(NOT_PROMPTED),
17 override_bounds_(params.initial_bounds),
18 initial_show_state_(params.initial_show_state),
19 initial_workspace_(params.initial_workspace),
20@@ -830,7 +833,7 @@ Browser::WarnBeforeClosingResult Browser
21 // If the browser can close right away (there are no pending downloads we need
22 // to prompt about) then there's no need to warn. In the future, we might need
23 // to check other conditions as well.
24- if (CanCloseWithInProgressDownloads())
25+ if (CanCloseWithInProgressDownloads() && CanCloseWithMultipleTabs())
26 return WarnBeforeClosingResult::kOkToClose;
27
28 DCHECK(!warn_before_closing_callback_)
29@@ -860,6 +863,7 @@ bool Browser::TryToCloseWindow(
30
31 void Browser::ResetTryToCloseWindow() {
32 cancel_download_confirmation_state_ = NOT_PROMPTED;
33+ close_multitab_confirmation_state_ = NOT_PROMPTED;
34 unload_controller_.ResetTryToCloseWindow();
35 }
36
37@@ -2702,6 +2706,62 @@ bool Browser::CanCloseWithInProgressDown
38 return false;
39 }
40
41+bool Browser::CanCloseWithMultipleTabs() {
42+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("close-confirmation"))
43+ return true;
44+
45+ // If we've prompted, we need to hear from the user before we
46+ // can close.
47+ if (close_multitab_confirmation_state_ != NOT_PROMPTED)
48+ return close_multitab_confirmation_state_ != WAITING_FOR_RESPONSE;
49+
50+ // If we're not running a full browser process with a profile manager
51+ // (testing), it's ok to close the browser.
52+ if (!g_browser_process->profile_manager())
53+ return true;
54+
55+ // Figure out how many windows are open total
56+ int total_window_count = 0;
57+ for (auto* browser : *BrowserList::GetInstance()) {
58+ // Don't count this browser window or any other in the process of closing.
59+ // Window closing may be delayed, and windows that are in the process of
60+ // closing don't count against our totals.
61+ if (browser == this || browser->IsAttemptingToCloseBrowser())
62+ continue;
63+ total_window_count++;
64+ }
65+
66+ const auto flag_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("close-confirmation");
67+ bool show_confirmation_last_window = flag_value == "last";
68+
69+ if (show_confirmation_last_window) {
70+ if (total_window_count >= 1 || this->tab_strip_model()->count() <= 1)
71+ return true;
72+ } else {
73+ if (total_window_count == 0)
74+ return true;
75+ if (this->tab_strip_model()->count() == 0)
76+ tab_strip_model_delegate_->AddTabAt(GURL(), -1, true);
77+ }
78+
79+ close_multitab_confirmation_state_ = WAITING_FOR_RESPONSE;
80+
81+ // The dialog eats mouse events which results in the close button
82+ // getting stuck in the hover state. Reset the window controls to
83+ // prevent this.
84+ ((BrowserView*)window_)->frame()->non_client_view()->ResetWindowControls();
85+ auto callback = base::BindOnce(&Browser::MultitabResponse,
86+ weak_factory_.GetWeakPtr());
87+ MessageBoxDialog::Show(window_->GetNativeWindow(),
88+ u"Do you want to close this window?", std::u16string(),
89+ chrome::MESSAGE_BOX_TYPE_QUESTION, u"Close", u"Cancel",
90+ std::u16string(), std::move(callback));
91+
92+ // Return false so the browser does not close. We'll close if the user
93+ // confirms in the dialog.
94+ return false;
95+}
96+
97 void Browser::InProgressDownloadResponse(bool cancel_downloads) {
98 if (cancel_downloads) {
99 cancel_download_confirmation_state_ = RESPONSE_RECEIVED;
100@@ -2720,6 +2780,22 @@ void Browser::InProgressDownloadResponse
101
102 std::move(warn_before_closing_callback_)
103 .Run(WarnBeforeClosingResult::kDoNotClose);
104+}
105+
106+void Browser::MultitabResponse(chrome::MessageBoxResult result) {
107+ if (result == chrome::MESSAGE_BOX_RESULT_YES) {
108+ close_multitab_confirmation_state_ = RESPONSE_RECEIVED;
109+ std::move(warn_before_closing_callback_)
110+ .Run(WarnBeforeClosingResult::kOkToClose);
111+ return;
112+ }
113+
114+ // Sets the confirmation state to NOT_PROMPTED so that if the user tries to
115+ // close again we'll show the warning again.
116+ close_multitab_confirmation_state_ = NOT_PROMPTED;
117+
118+ std::move(warn_before_closing_callback_)
119+ .Run(WarnBeforeClosingResult::kDoNotClose);
120 }
121
122 void Browser::FinishWarnBeforeClosing(WarnBeforeClosingResult result) {
123--- chrome/browser/ui/browser.h.orig
124+++ chrome/browser/ui/browser.h
125@@ -26,6 +26,7 @@
126 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_observer.h"
127 #include "chrome/browser/ui/browser_navigator_params.h"
128 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h"
129+#include "chrome/browser/ui/simple_message_box.h"
130 #include "chrome/browser/ui/signin_view_controller.h"
131 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
132 #include "chrome/browser/ui/unload_controller.h"
133@@ -1008,12 +1009,17 @@ class Browser : public TabStripModelObse
134 // Returns true if the window can close, false otherwise.
135 bool CanCloseWithInProgressDownloads();
136
137+ // Called when the window is closing to check if more than one tabs are open
138+ bool CanCloseWithMultipleTabs();
139+
140 // Called when the user has decided whether to proceed or not with the browser
141 // closure. |cancel_downloads| is true if the downloads should be canceled
142 // and the browser closed, false if the browser should stay open and the
143 // downloads running.
144 void InProgressDownloadResponse(bool cancel_downloads);
145
146+ void MultitabResponse(chrome::MessageBoxResult result);
147+
148 // Called when all warnings have completed when attempting to close the
149 // browser directly (e.g. via hotkey, close button, terminate signal, etc.)
150 // Used as a WarnBeforeClosingCallback by ShouldCloseWindow().
151@@ -1176,6 +1182,8 @@ class Browser : public TabStripModelObse
152 // when the browser is closed with in-progress downloads.
153 CancelDownloadConfirmationState cancel_download_confirmation_state_;
154
155+ CancelDownloadConfirmationState close_multitab_confirmation_state_;
156+
157 /////////////////////////////////////////////////////////////////////////////
158
159 // Override values for the bounds of the window and its maximized or minimized
160--- chrome/browser/ungoogled_flag_choices.h.orig
161+++ chrome/browser/ungoogled_flag_choices.h
162@@ -66,4 +66,13 @@ const FeatureEntry::Choice kCloseWindowW
163 "close-window-with-last-tab",
164 "never"},
165 };
166+const FeatureEntry::Choice kCloseConfirmation[] = {
167+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
168+ {"Show confirmation with last window",
169+ "close-confirmation",
170+ "last"},
171+ {"Show confirmation with multiple windows",
172+ "close-confirmation",
173+ "multiple"},
174+};
175 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
176--- chrome/browser/ungoogled_flag_entries.h.orig
177+++ chrome/browser/ungoogled_flag_entries.h
178@@ -80,4 +80,8 @@
179 "Remove Grab Handle",
180 "Removes the reserved empty space in the tabstrip for moving the window. ungoogled-chromium flag",
181 kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")},
182+ {"close-confirmation",
183+ "Close Confirmation",
184+ "Show a warning prompt when closing the browser window. ungoogled-chromium flag",
185+ kOsDesktop, MULTI_VALUE_TYPE(kCloseConfirmation)},
186 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch
deleted file mode 100644
index 6bb52b8..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1--- chrome/browser/chrome_content_browser_client.cc.orig
2+++ chrome/browser/chrome_content_browser_client.cc
3@@ -743,6 +743,9 @@ bool HandleNewTabPageLocationOverride(
4 Profile* profile = Profile::FromBrowserContext(browser_context);
5 std::string ntp_location =
6 profile->GetPrefs()->GetString(prefs::kNewTabPageLocationOverride);
7+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("custom-ntp"))
8+ ntp_location = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("custom-ntp");
9+ if (profile->IsOffTheRecord() && ntp_location.find("chrome://") != std::string::npos) return false;
10 if (ntp_location.empty())
11 return false;
12 url::Component scheme;
13--- chrome/browser/ungoogled_flag_entries.h.orig
14+++ chrome/browser/ungoogled_flag_entries.h
15@@ -84,4 +84,8 @@
16 "Close Confirmation",
17 "Show a warning prompt when closing the browser window. ungoogled-chromium flag",
18 kOsDesktop, MULTI_VALUE_TYPE(kCloseConfirmation)},
19+ {"custom-ntp",
20+ "Custom New Tab Page",
21+ "Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page. ungoogled-chromium flag",
22+ kOsDesktop, ORIGIN_LIST_VALUE_TYPE("custom-ntp", "")},
23 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
24--- components/flags_ui/flags_state.cc.orig
25+++ components/flags_ui/flags_state.cc
26@@ -231,6 +231,7 @@ std::string GetCombinedOriginListValue(c
27 command_line_switch);
28 const std::string new_value =
29 flags_storage.GetOriginListFlag(internal_entry_name);
30+ if (command_line_switch == "custom-ntp") return existing_value.empty() ? new_value : existing_value;
31 return CombineAndSanitizeOriginLists(existing_value, new_value);
32 }
33
34@@ -417,6 +418,7 @@ void FlagsState::SetOriginListFlag(const
35 const std::string& value,
36 FlagsStorage* flags_storage) {
37 const std::string new_value =
38+ internal_name == "custom-ntp" ? value :
39 CombineAndSanitizeOriginLists(std::string(), value);
40 flags_storage->SetOriginListFlag(internal_name, new_value);
41
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch
deleted file mode 100644
index 8fc406a..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig
2+++ chrome/browser/ui/views/frame/tab_strip_region_view.cc
3@@ -42,6 +42,7 @@ class FrameGrabHandle : public views::Vi
4 // Reserve some space for the frame to be grabbed by, even if the tabstrip
5 // is full.
6 // TODO(tbergquist): Define this relative to the NTB insets again.
7+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("remove-grab-handle")) return gfx::Size(0, 0);
8 return gfx::Size(42, 0);
9 }
10 };
11--- chrome/browser/ungoogled_flag_entries.h.orig
12+++ chrome/browser/ungoogled_flag_entries.h
13@@ -76,4 +76,8 @@
14 "Disable QR Generator",
15 "Disables the QR generator for sharing page links. ungoogled-chromium flag",
16 kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
17+ {"remove-grab-handle",
18+ "Remove Grab Handle",
19+ "Removes the reserved empty space in the tabstrip for moving the window. ungoogled-chromium flag",
20+ kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")},
21 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch
deleted file mode 100644
index 0e695ce..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch
+++ /dev/null
@@ -1,112 +0,0 @@
1--- chrome/browser/ungoogled_flag_choices.h.orig
2+++ chrome/browser/ungoogled_flag_choices.h
3@@ -45,4 +45,19 @@ const FeatureEntry::Choice kBookmarkBarN
4 "bookmark-bar-ntp",
5 "never"},
6 };
7+const FeatureEntry::Choice kOmniboxAutocompleteFiltering[] = {
8+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
9+ {"Search suggestions only",
10+ "omnibox-autocomplete-filtering",
11+ "search"},
12+ {"Search suggestions and bookmarks",
13+ "omnibox-autocomplete-filtering",
14+ "search-bookmarks"},
15+ {"Search suggestions and internal chrome pages",
16+ "omnibox-autocomplete-filtering",
17+ "search-chrome"},
18+ {"Search suggestions, bookmarks, and internal chrome pages",
19+ "omnibox-autocomplete-filtering",
20+ "search-bookmarks-chrome"},
21+};
22 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
23--- chrome/browser/ungoogled_flag_entries.h.orig
24+++ chrome/browser/ungoogled_flag_entries.h
25@@ -48,4 +48,8 @@
26 "Bookmark Bar on New-Tab-Page",
27 "Disable the Bookmark Bar on the New-Tab-Page. ungoogled-chromium flag.",
28 kOsDesktop, MULTI_VALUE_TYPE(kBookmarkBarNewTab)},
29+ {"omnibox-autocomplete-filtering",
30+ "Omnibox Autocomplete Filtering",
31+ "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. ungoogled-chromium flag.",
32+ kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)},
33 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
34--- components/omnibox/browser/autocomplete_controller.cc.orig
35+++ components/omnibox/browser/autocomplete_controller.cc
36@@ -15,6 +15,8 @@
37
38 #include "base/bind.h"
39 #include "base/check_op.h"
40+#include "base/containers/contains.h"
41+#include "base/command_line.h"
42 #include "base/feature_list.h"
43 #include "base/format_macros.h"
44 #include "base/metrics/histogram.h"
45@@ -276,6 +278,15 @@ AutocompleteController::AutocompleteCont
46 search_service_worker_signal_sent_(false),
47 template_url_service_(provider_client_->GetTemplateURLService()) {
48 provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
49+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("omnibox-autocomplete-filtering")) {
50+ const std::string flag_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("omnibox-autocomplete-filtering");
51+ provider_types &= AutocompleteProvider::TYPE_KEYWORD | AutocompleteProvider::TYPE_SEARCH |
52+ AutocompleteProvider::TYPE_HISTORY_URL | AutocompleteProvider::TYPE_BOOKMARK | AutocompleteProvider::TYPE_BUILTIN;
53+ if (!base::Contains(flag_value, "bookmarks"))
54+ provider_types &= ~AutocompleteProvider::TYPE_BOOKMARK;
55+ if (!base::Contains(flag_value, "chrome"))
56+ provider_types &= ~AutocompleteProvider::TYPE_BUILTIN;
57+ }
58 if (provider_types & AutocompleteProvider::TYPE_BOOKMARK)
59 providers_.push_back(new BookmarkProvider(provider_client_.get()));
60 if (provider_types & AutocompleteProvider::TYPE_BUILTIN)
61--- components/omnibox/browser/history_url_provider.cc.orig
62+++ components/omnibox/browser/history_url_provider.cc
63@@ -551,6 +551,9 @@ void HistoryURLProvider::Start(const Aut
64 if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
65 matches_.push_back(what_you_typed_match);
66
67+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("omnibox-autocomplete-filtering"))
68+ return;
69+
70 // We'll need the history service to run both passes, so try to obtain it.
71 history::HistoryService* const history_service =
72 client()->GetHistoryService();
73--- components/omnibox/browser/search_provider.cc.orig
74+++ components/omnibox/browser/search_provider.cc
75@@ -12,6 +12,7 @@
76 #include "base/base64.h"
77 #include "base/bind.h"
78 #include "base/callback.h"
79+#include "base/command_line.h"
80 #include "base/feature_list.h"
81 #include "base/i18n/break_iterator.h"
82 #include "base/i18n/case_conversion.h"
83@@ -646,6 +647,9 @@ void SearchProvider::Run(bool query_is_p
84 }
85
86 void SearchProvider::DoHistoryQuery(bool minimal_changes) {
87+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("omnibox-autocomplete-filtering"))
88+ return;
89+
90 // The history query results are synchronous, so if minimal_changes is true,
91 // we still have the last results and don't need to do anything.
92 if (minimal_changes)
93--- components/url_formatter/url_fixer.cc.orig
94+++ components/url_formatter/url_fixer.cc
95@@ -9,6 +9,8 @@
96 #include <algorithm>
97
98 #include "base/check_op.h"
99+#include "base/containers/contains.h"
100+#include "base/command_line.h"
101 #include "base/files/file_path.h"
102 #include "base/files/file_util.h"
103 #include "base/ranges/algorithm.h"
104@@ -607,6 +609,8 @@ GURL FixupURL(const std::string& text, c
105
106 FixupHost(trimmed, parts.host, parts.scheme.is_valid(), desired_tld, &url);
107 if (chrome_url && !parts.host.is_valid())
108+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("omnibox-autocomplete-filtering") ||
109+ base::Contains(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("omnibox-autocomplete-filtering"), "chrome"))
110 url.append(kChromeUIDefaultHost);
111 FixupPort(trimmed, parts.port, &url);
112 FixupPath(trimmed, parts.path, &url);
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch
deleted file mode 100644
index 5b52596..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch
+++ /dev/null
@@ -1,389 +0,0 @@
1--- chrome/browser/chrome_content_browser_client.cc.orig
2+++ chrome/browser/chrome_content_browser_client.cc
3@@ -6001,7 +6001,7 @@ bool ChromeContentBrowserClient::ShouldA
4 const url::Origin& embedder_origin,
5 const content::PepperPluginInfo& plugin_info) {
6 #if BUILDFLAG(ENABLE_PDF)
7- if (plugin_info.name == ChromeContentClient::kPDFInternalPluginName) {
8+ if (plugin_info.name == ChromeContentClient::GetPDFInternalPluginName()) {
9 return IsPdfInternalPluginAllowedOrigin(embedder_origin);
10 }
11 #endif // BUILDFLAG(ENABLE_PDF)
12--- chrome/browser/pdf/pdf_extension_util.cc.orig
13+++ chrome/browser/pdf/pdf_extension_util.cc
14@@ -170,7 +170,7 @@ std::string GetManifest() {
15 DCHECK(manifest_contents.find(kNameTag) != std::string::npos);
16 base::ReplaceFirstSubstringAfterOffset(
17 &manifest_contents, 0, kNameTag,
18- ChromeContentClient::kPDFExtensionPluginName);
19+ ChromeContentClient::GetPDFExtensionPluginName());
20
21 return manifest_contents;
22 }
23--- chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc.orig
24+++ chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc
25@@ -65,7 +65,7 @@ class PDFIFrameNavigationThrottleTest :
26 // Register a fake PDF Viewer plugin into our plugin service.
27 content::WebPluginInfo info;
28 info.name =
29- base::ASCIIToUTF16(ChromeContentClient::kPDFExtensionPluginName);
30+ base::ASCIIToUTF16(ChromeContentClient::GetPDFExtensionPluginName());
31 info.mime_types.push_back(content::WebPluginMimeType(
32 kPDFMimeType, "pdf", "Fake PDF description"));
33 plugin_service->RegisterInternalPlugin(info, true);
34--- chrome/browser/plugins/plugin_prefs.cc.orig
35+++ chrome/browser/plugins/plugin_prefs.cc
36@@ -40,7 +40,7 @@ bool IsPDFViewerPlugin(const std::u16str
37 // plugin, which is also used for Print Preview. Note that only the PDF viewer
38 // and Print Preview can create the internal PDF plugin in the first place.
39 return plugin_name ==
40- base::ASCIIToUTF16(ChromeContentClient::kPDFExtensionPluginName);
41+ base::ASCIIToUTF16(ChromeContentClient::GetPDFExtensionPluginName());
42 }
43
44 } // namespace
45--- chrome/browser/plugins/plugin_prefs_unittest.cc.orig
46+++ chrome/browser/plugins/plugin_prefs_unittest.cc
47@@ -24,11 +24,11 @@ class PluginPrefsTest : public ::testing
48 TEST_F(PluginPrefsTest, AlwaysOpenPdfExternally) {
49 EXPECT_EQ(PluginPrefs::NO_POLICY,
50 plugin_prefs_->PolicyStatusForPlugin(base::ASCIIToUTF16(
51- ChromeContentClient::kPDFExtensionPluginName)));
52+ ChromeContentClient::GetPDFExtensionPluginName())));
53
54 SetAlwaysOpenPdfExternally(true);
55
56 EXPECT_EQ(PluginPrefs::POLICY_DISABLED,
57 plugin_prefs_->PolicyStatusForPlugin(base::ASCIIToUTF16(
58- ChromeContentClient::kPDFExtensionPluginName)));
59+ ChromeContentClient::GetPDFExtensionPluginName())));
60 }
61--- chrome/browser/resources/plugin_metadata/plugins_chromeos.json.orig
62+++ chrome/browser/resources/plugin_metadata/plugins_chromeos.json
63@@ -44,6 +44,19 @@
64 "name": "Chrome PDF Viewer",
65 "group_name_matcher": "*Chrome PDF Viewer*"
66 },
67+ "microsoft-edge-pdf": {
68+ "mime_types": [
69+ ],
70+ "versions": [
71+ {
72+ "version": "0",
73+ "status": "fully_trusted",
74+ "comment": "Microsoft Edge PDF has no version information."
75+ }
76+ ],
77+ "name": "Microsoft Edge PDF Viewer",
78+ "group_name_matcher": "*Microsoft Edge PDF Viewer*"
79+ },
80 "chromium-pdf": {
81 "mime_types": [
82 ],
83@@ -70,6 +83,19 @@
84 "name": "Chrome PDF Plugin",
85 "group_name_matcher": "*Chrome PDF Plugin*"
86 },
87+ "microsoft-edge-pdf-plugin": {
88+ "mime_types": [
89+ ],
90+ "versions": [
91+ {
92+ "version": "0",
93+ "status": "fully_trusted",
94+ "comment": "Microsoft Edge PDF Plugin has no version information."
95+ }
96+ ],
97+ "name": "Microsoft Edge PDF Plugin",
98+ "group_name_matcher": "*Microsoft Edge PDF Plugin*"
99+ },
100 "chromium-pdf-plugin": {
101 "mime_types": [
102 ],
103--- chrome/browser/resources/plugin_metadata/plugins_linux.json.orig
104+++ chrome/browser/resources/plugin_metadata/plugins_linux.json
105@@ -36,6 +36,19 @@
106 "name": "Chrome PDF Viewer",
107 "group_name_matcher": "*Chrome PDF Viewer*"
108 },
109+ "microsoft-edge-pdf": {
110+ "mime_types": [
111+ ],
112+ "versions": [
113+ {
114+ "version": "0",
115+ "status": "fully_trusted",
116+ "comment": "Microsoft Edge PDF has no version information."
117+ }
118+ ],
119+ "name": "Microsoft Edge PDF Viewer",
120+ "group_name_matcher": "*Microsoft Edge PDF Viewer*"
121+ },
122 "chromium-pdf": {
123 "mime_types": [
124 ],
125@@ -62,6 +75,19 @@
126 "name": "Chrome PDF Plugin",
127 "group_name_matcher": "*Chrome PDF Plugin*"
128 },
129+ "microsoft-edge-pdf-plugin": {
130+ "mime_types": [
131+ ],
132+ "versions": [
133+ {
134+ "version": "0",
135+ "status": "fully_trusted",
136+ "comment": "Google Chrome PDF Plugin has no version information."
137+ }
138+ ],
139+ "name": "Microsoft Edge PDF Plugin",
140+ "group_name_matcher": "*Microsoft Edge PDF Plugin*"
141+ },
142 "chromium-pdf-plugin": {
143 "mime_types": [
144 ],
145--- chrome/browser/resources/plugin_metadata/plugins_mac.json.orig
146+++ chrome/browser/resources/plugin_metadata/plugins_mac.json
147@@ -33,6 +33,19 @@
148 "name": "Chrome PDF Viewer",
149 "group_name_matcher": "*Chrome PDF Viewer*"
150 },
151+ "microsoft-edge-pdf": {
152+ "mime_types": [
153+ ],
154+ "versions": [
155+ {
156+ "version": "0",
157+ "status": "fully_trusted",
158+ "comment": "Microsoft Edge PDF Viewer has no version information."
159+ }
160+ ],
161+ "name": "Microsoft Edge PDF Viewer",
162+ "group_name_matcher": "*Microsoft Edge PDF Viewer*"
163+ },
164 "chromium-pdf": {
165 "mime_types": [
166 ],
167@@ -59,6 +72,19 @@
168 "name": "Chrome PDF Plugin",
169 "group_name_matcher": "*Chrome PDF Plugin*"
170 },
171+ "microsoft-edge-pdf-plugin": {
172+ "mime_types": [
173+ ],
174+ "versions": [
175+ {
176+ "version": "0",
177+ "status": "fully_trusted",
178+ "comment": "Microsoft Edge PDF Plugin has no version information."
179+ }
180+ ],
181+ "name": "Microsoft Edge PDF Plugin",
182+ "group_name_matcher": "*Microsoft Edge PDF Plugin*"
183+ },
184 "chromium-pdf-plugin": {
185 "mime_types": [
186 ],
187--- chrome/browser/resources/plugin_metadata/plugins_win.json.orig
188+++ chrome/browser/resources/plugin_metadata/plugins_win.json
189@@ -33,6 +33,19 @@
190 "name": "Chrome PDF Viewer",
191 "group_name_matcher": "*Chrome PDF Viewer*"
192 },
193+ "microsoft-edge-pdf": {
194+ "mime_types": [
195+ ],
196+ "versions": [
197+ {
198+ "version": "0",
199+ "status": "fully_trusted",
200+ "comment": "Microsoft Edge PDF Viewer has no version information."
201+ }
202+ ],
203+ "name": "Microsoft Edge PDF Viewer",
204+ "group_name_matcher": "*Microsoft Edge PDF Viewer*"
205+ },
206 "chromium-pdf": {
207 "mime_types": [
208 ],
209@@ -59,6 +72,19 @@
210 "name": "Chrome PDF Plugin",
211 "group_name_matcher": "*Chrome PDF Plugin*"
212 },
213+ "microsoft-edge-pdf-plugin": {
214+ "mime_types": [
215+ ],
216+ "versions": [
217+ {
218+ "version": "0",
219+ "status": "fully_trusted",
220+ "comment": "Microsoft Edge PDF Plugin has no version information."
221+ }
222+ ],
223+ "name": "Microsoft Edge PDF Plugin",
224+ "group_name_matcher": "*Microsoft Edge PDF Plugin*"
225+ },
226 "chromium-pdf-plugin": {
227 "mime_types": [
228 ],
229--- chrome/browser/ungoogled_flag_choices.h.orig
230+++ chrome/browser/ungoogled_flag_choices.h
231@@ -34,4 +34,9 @@ const FeatureEntry::Choice kScrollEventC
232 "scroll-tabs",
233 "never"}
234 };
235+const FeatureEntry::Choice kPDFPluginNameChoices[] = {
236+ {"Chromium", "", ""},
237+ {"Google Chrome", switches::kPDFPluginName, "chrome"},
238+ {"Microsoft Edge", switches::kPDFPluginName, "edge"},
239+};
240 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
241--- chrome/browser/ungoogled_flag_entries.h.orig
242+++ chrome/browser/ungoogled_flag_entries.h
243@@ -40,4 +40,8 @@
244 "Scroll switches tab",
245 "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.",
246 kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)},
247+ {"pdf-plugin-name",
248+ "Set internal PDF plugin name",
249+ "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.",
250+ kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)},
251 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
252--- chrome/common/BUILD.gn.orig
253+++ chrome/common/BUILD.gn
254@@ -249,6 +249,7 @@ static_library("common") {
255 "//components/no_state_prefetch/common",
256 "//components/no_state_prefetch/common:mojo_bindings",
257 "//components/page_load_metrics/common:common",
258+ "//components/ungoogled:ungoogled_switches",
259 ]
260
261 if (enable_pdf) {
262--- chrome/common/chrome_content_client.cc.orig
263+++ chrome/common/chrome_content_client.cc
264@@ -122,7 +122,7 @@ void ComputeBuiltInPlugins(std::vector<c
265 content::PepperPluginInfo pdf_info;
266 pdf_info.is_internal = true;
267 pdf_info.is_out_of_process = true;
268- pdf_info.name = ChromeContentClient::kPDFInternalPluginName;
269+ pdf_info.name = ChromeContentClient::GetPDFInternalPluginName();
270 pdf_info.description = kPDFPluginDescription;
271 pdf_info.path = base::FilePath(ChromeContentClient::kPDFPluginPath);
272 content::WebPluginMimeType pdf_mime_type(
273--- chrome/common/chrome_content_client.h.orig
274+++ chrome/common/chrome_content_client.h
275@@ -42,8 +42,8 @@ class ChromeContentClient : public conte
276 static const base::FilePath::CharType kNaClPluginFileName[];
277 #endif
278
279- static const char kPDFExtensionPluginName[];
280- static const char kPDFInternalPluginName[];
281+ static const char *GetPDFExtensionPluginName();
282+ static const char *GetPDFInternalPluginName();
283 static const base::FilePath::CharType kPDFPluginPath[];
284
285 ChromeContentClient();
286--- chrome/common/chrome_content_client_constants.cc.orig
287+++ chrome/common/chrome_content_client_constants.cc
288@@ -2,8 +2,12 @@
289 // Use of this source code is governed by a BSD-style license that can be
290 // found in the LICENSE file.
291
292+#include <string>
293+
294+#include "base/command_line.h"
295 #include "build/branding_buildflags.h"
296 #include "chrome/common/chrome_content_client.h"
297+#include "components/ungoogled/ungoogled_switches.h"
298
299 #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
300 const base::FilePath::CharType ChromeContentClient::kNotPresent[] =
301@@ -15,15 +19,52 @@ const base::FilePath::CharType ChromeCon
302 FILE_PATH_LITERAL("internal-nacl-plugin");
303 #endif
304
305-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
306-const char ChromeContentClient::kPDFExtensionPluginName[] = "Chrome PDF Viewer";
307-const char ChromeContentClient::kPDFInternalPluginName[] = "Chrome PDF Plugin";
308-#else
309-const char ChromeContentClient::kPDFExtensionPluginName[] =
310+namespace {
311+
312+const char kChromePDFExtensionPluginName[] =
313+ "Chrome PDF Viewer";
314+const char kChromePDFInternalPluginName[] =
315+ "Chrome PDF Plugin";
316+const char kEdgePDFExtensionPluginName[] =
317+ "Microsoft Edge PDF Viewer";
318+const char kEdgePDFInternalPluginName[] =
319+ "Microsoft Edge PDF Plugin";
320+const char kChromiumPDFExtensionPluginName[] =
321 "Chromium PDF Viewer";
322-const char ChromeContentClient::kPDFInternalPluginName[] =
323+const char kChromiumPDFInternalPluginName[] =
324 "Chromium PDF Plugin";
325-#endif
326+
327+} // namespace
328+
329+// static
330+const char *ChromeContentClient::GetPDFExtensionPluginName() {
331+ const base::CommandLine& command_line =
332+ *base::CommandLine::ForCurrentProcess();
333+ if (command_line.HasSwitch(switches::kPDFPluginName)) {
334+ std::string switch_value = command_line.GetSwitchValueASCII(switches::kPDFPluginName);
335+ if (switch_value == "edge") {
336+ return kEdgePDFExtensionPluginName;
337+ } else if (switch_value == "chrome") {
338+ return kChromePDFExtensionPluginName;
339+ }
340+ }
341+ return kChromiumPDFExtensionPluginName;
342+}
343+
344+// static
345+const char *ChromeContentClient::GetPDFInternalPluginName() {
346+ const base::CommandLine& command_line =
347+ *base::CommandLine::ForCurrentProcess();
348+ if (command_line.HasSwitch(switches::kPDFPluginName)) {
349+ std::string switch_value = command_line.GetSwitchValueASCII(switches::kPDFPluginName);
350+ if (switch_value == "edge") {
351+ return kEdgePDFInternalPluginName;
352+ } else if (switch_value == "chrome") {
353+ return kChromePDFInternalPluginName;
354+ }
355+ }
356+ return kChromiumPDFInternalPluginName;
357+}
358
359 const base::FilePath::CharType ChromeContentClient::kPDFPluginPath[] =
360 FILE_PATH_LITERAL("internal-pdf-viewer");
361--- chrome/renderer/chrome_content_renderer_client.cc.orig
362+++ chrome/renderer/chrome_content_renderer_client.cc
363@@ -1047,7 +1047,7 @@ WebPlugin* ChromeContentRendererClient::
364 }
365 }
366 } else if (info.name ==
367- ASCIIToUTF16(ChromeContentClient::kPDFExtensionPluginName)) {
368+ ASCIIToUTF16(ChromeContentClient::GetPDFExtensionPluginName())) {
369 // Report PDF load metrics. Since the PDF plugin is comprised of an
370 // extension that loads a second plugin, avoid double counting by
371 // ignoring the creation of the second plugin.
372@@ -1079,7 +1079,7 @@ WebPlugin* ChromeContentRendererClient::
373
374 #if BUILDFLAG(ENABLE_PDF)
375 if (info.name ==
376- ASCIIToUTF16(ChromeContentClient::kPDFInternalPluginName)) {
377+ ASCIIToUTF16(ChromeContentClient::GetPDFInternalPluginName())) {
378 return pdf::CreateInternalPlugin(
379 info, std::move(params), render_frame,
380 std::make_unique<ChromePdfInternalPluginDelegate>());
381@@ -1092,7 +1092,7 @@ WebPlugin* ChromeContentRendererClient::
382 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
383 url);
384 if (info.name ==
385- ASCIIToUTF16(ChromeContentClient::kPDFExtensionPluginName)) {
386+ ASCIIToUTF16(ChromeContentClient::GetPDFExtensionPluginName())) {
387 ReportPDFLoadStatus(
388 PDFLoadStatus::kShowedDisabledPluginPlaceholderForEmbeddedPdf);
389
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch
deleted file mode 100644
index 5b97e10..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1--- chrome/browser/sharing/features.cc.orig
2+++ chrome/browser/sharing/features.cc
3@@ -32,3 +32,5 @@ const base::Feature kSharingPreferVapid
4 base::FEATURE_DISABLED_BY_DEFAULT
5 #endif // defined(OS_ANDROID)
6 };
7+
8+const base::Feature kDisableQRGenerator{"DisableQRGenerator", base::FEATURE_DISABLED_BY_DEFAULT};
9--- chrome/browser/sharing/features.h.orig
10+++ chrome/browser/sharing/features.h
11@@ -34,4 +34,5 @@ extern const base::Feature kSharingSendV
12 // Feature flag for prefer sending sharing message using VAPID.
13 extern const base::Feature kSharingPreferVapid;
14
15+extern const base::Feature kDisableQRGenerator;
16 #endif // CHROME_BROWSER_SHARING_FEATURES_H_
17--- chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc.orig
18+++ chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
19@@ -23,7 +23,7 @@ QRCodeGeneratorBubbleController::~QRCode
20
21 // static
22 bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
23- if (!url.SchemeIsHTTPOrHTTPS())
24+ if (!url.SchemeIsHTTPOrHTTPS() || base::FeatureList::IsEnabled(kDisableQRGenerator))
25 return false;
26
27 return true;
28--- chrome/browser/ui/views/location_bar/location_bar_view.cc.orig
29+++ chrome/browser/ui/views/location_bar/location_bar_view.cc
30@@ -297,7 +297,8 @@ void LocationBarView::Init() {
31 // the left most icon.
32 params.types_enabled.push_back(PageActionIconType::kSendTabToSelf);
33 params.types_enabled.push_back(PageActionIconType::kClickToCall);
34- params.types_enabled.push_back(PageActionIconType::kQRCodeGenerator);
35+ if (!base::FeatureList::IsEnabled(kDisableQRGenerator))
36+ params.types_enabled.push_back(PageActionIconType::kQRCodeGenerator);
37 if (base::FeatureList::IsEnabled(kSharedClipboardUI))
38 params.types_enabled.push_back(PageActionIconType::kSharedClipboard);
39 if (base::FeatureList::IsEnabled(kWebOTPCrossDevice))
40--- chrome/browser/ungoogled_flag_entries.h.orig
41+++ chrome/browser/ungoogled_flag_entries.h
42@@ -72,4 +72,8 @@
43 "Remove Tabsearch Button",
44 "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
45 kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
46+ {"disable-qr-generator",
47+ "Disable QR Generator",
48+ "Disables the QR generator for sharing page links. ungoogled-chromium flag",
49+ kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
50 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch
deleted file mode 100644
index b80101e..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch
+++ /dev/null
@@ -1,134 +0,0 @@
1# Add flag to disable automatic search engine collection
2
3--- chrome/browser/ungoogled_flag_entries.h.orig
4+++ chrome/browser/ungoogled_flag_entries.h
5@@ -16,4 +16,8 @@
6 "Handling of extension MIME type requests",
7 "Used when deciding how to handle a request for a CRX or User Script MIME type. ungoogled-chromium flag.",
8 kOsAll, MULTI_VALUE_TYPE(kExtensionHandlingChoices)},
9+ {"disable-search-engine-collection",
10+ "Disable search engine collection",
11+ "Prevents search engines from being added automatically. ungoogled-chromium flag.",
12+ kOsAll, SINGLE_VALUE_TYPE("disable-search-engine-collection")},
13 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
14--- chrome/renderer/chrome_render_frame_observer.cc.orig
15+++ chrome/renderer/chrome_render_frame_observer.cc
16@@ -139,9 +139,10 @@ ChromeRenderFrameObserver::ChromeRenderF
17 if (!render_frame->IsMainFrame())
18 return;
19
20-#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
21 const base::CommandLine& command_line =
22 *base::CommandLine::ForCurrentProcess();
23+ should_autocollect_ = !command_line.HasSwitch("disable-search-engine-collection");
24+#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
25 if (!command_line.HasSwitch(switches::kDisableClientSidePhishingDetection))
26 SetClientSidePhishingDetection();
27 #endif
28@@ -201,14 +202,16 @@ void ChromeRenderFrameObserver::DidFinis
29 if (frame->Parent())
30 return;
31
32- GURL osdd_url = frame->GetDocument().OpenSearchDescriptionURL();
33- if (!osdd_url.is_empty()) {
34- mojo::AssociatedRemote<chrome::mojom::OpenSearchDescriptionDocumentHandler>
35- osdd_handler;
36- render_frame()->GetRemoteAssociatedInterfaces()->GetInterface(
37- &osdd_handler);
38- osdd_handler->PageHasOpenSearchDescriptionDocument(
39- frame->GetDocument().Url(), osdd_url);
40+ if (should_autocollect_) {
41+ GURL osdd_url = frame->GetDocument().OpenSearchDescriptionURL();
42+ if (!osdd_url.is_empty()) {
43+ mojo::AssociatedRemote<chrome::mojom::OpenSearchDescriptionDocumentHandler>
44+ osdd_handler;
45+ render_frame()->GetRemoteAssociatedInterfaces()->GetInterface(
46+ &osdd_handler);
47+ osdd_handler->PageHasOpenSearchDescriptionDocument(
48+ frame->GetDocument().Url(), osdd_url);
49+ }
50 }
51 }
52
53--- chrome/renderer/chrome_render_frame_observer.h.orig
54+++ chrome/renderer/chrome_render_frame_observer.h
55@@ -139,6 +139,7 @@ class ChromeRenderFrameObserver : public
56 #if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
57 safe_browsing::PhishingClassifierDelegate* phishing_classifier_ = nullptr;
58 #endif
59+ bool should_autocollect_; // Whether to autocollect search engines
60
61 // Owned by ChromeContentRendererClient and outlive us.
62 web_cache::WebCacheImpl* web_cache_impl_;
63--- components/search_engines/template_url_service.cc.orig
64+++ components/search_engines/template_url_service.cc
65@@ -12,6 +12,7 @@
66 #include "base/bind.h"
67 #include "base/callback.h"
68 #include "base/callback_helpers.h"
69+#include "base/command_line.h"
70 #include "base/containers/contains.h"
71 #include "base/debug/crash_logging.h"
72 #include "base/format_macros.h"
73@@ -197,6 +198,12 @@ bool IsCreatedByExtension(const Template
74 template_url->type() == TemplateURL::OMNIBOX_API_EXTENSION;
75 }
76
77+bool ShouldAutocollect() {
78+ const base::CommandLine& command_line =
79+ *base::CommandLine::ForCurrentProcess();
80+ return !command_line.HasSwitch("disable-search-engine-collection");
81+}
82+
83 } // namespace
84
85 // TemplateURLService::LessWithPrefix -----------------------------------------
86@@ -282,6 +289,7 @@ TemplateURLService::TemplateURLService(
87 std::unique_ptr<TemplateURLServiceClient> client,
88 const base::RepeatingClosure& dsp_change_callback)
89 : prefs_(prefs),
90+ should_autocollect_(true),
91 search_terms_data_(std::move(search_terms_data)),
92 web_data_service_(web_data_service),
93 client_(std::move(client)),
94@@ -363,8 +371,8 @@ bool TemplateURLService::CanAddAutogener
95 // that may interfere with search queries). An easy heuristic for this is
96 // whether the user has a TemplateURL that has been manually modified (e.g.,
97 // renamed) connected to the same host.
98- return !url.is_valid() || url.host().empty() ||
99- CanAddAutogeneratedKeywordForHost(url.host());
100+ return should_autocollect_ && (!url.is_valid() || url.host().empty() ||
101+ CanAddAutogeneratedKeywordForHost(url.host()));
102 }
103
104 bool TemplateURLService::IsPrepopulatedOrCreatedByPolicy(
105@@ -1496,6 +1504,8 @@ SyncDataMap TemplateURLService::CreateGU
106
107 void TemplateURLService::Init(const Initializer* initializers,
108 int num_initializers) {
109+ should_autocollect_ = ShouldAutocollect();
110+
111 if (client_)
112 client_->SetOwner(this);
113
114@@ -1632,6 +1642,9 @@ void TemplateURLService::ChangeToLoadedS
115
116 bool TemplateURLService::CanAddAutogeneratedKeywordForHost(
117 const std::string& host) const {
118+ if (!should_autocollect_)
119+ return false;
120+
121 const TemplateURLSet* urls = provider_map_->GetURLsForHost(host);
122 if (!urls)
123 return true;
124--- components/search_engines/template_url_service.h.orig
125+++ components/search_engines/template_url_service.h
126@@ -706,6 +706,8 @@ class TemplateURLService : public WebDat
127 // ---------- Browser state related members ---------------------------------
128 PrefService* prefs_ = nullptr;
129
130+ bool should_autocollect_; // Whether search engines should be auto-collected
131+
132 std::unique_ptr<SearchTermsData> search_terms_data_ =
133 std::make_unique<SearchTermsData>();
134
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tab-hover-cards.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tab-hover-cards.patch
deleted file mode 100644
index 6010902..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tab-hover-cards.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1--- chrome/browser/ui/views/tabs/tab.cc.orig
2+++ chrome/browser/ui/views/tabs/tab.cc
3@@ -12,6 +12,7 @@
4 #include <utility>
5
6 #include "base/bind.h"
7+#include "base/command_line.h"
8 #include "base/debug/alias.h"
9 #include "base/i18n/rtl.h"
10 #include "base/metrics/user_metrics.h"
11@@ -641,6 +642,8 @@ void Tab::OnGestureEvent(ui::GestureEven
12 }
13
14 std::u16string Tab::GetTooltipText(const gfx::Point& p) const {
15+ if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("tab-hover-cards") == "tooltip")
16+ return GetTooltipText(data_.title, GetAlertStateToShow(data_.alert_state));
17 // Tab hover cards replace tooltips for tabs.
18 return std::u16string();
19 }
20--- chrome/browser/ui/views/tabs/tab_strip.cc.orig
21+++ chrome/browser/ui/views/tabs/tab_strip.cc
22@@ -15,6 +15,7 @@
23
24 #include "base/bind.h"
25 #include "base/callback.h"
26+#include "base/command_line.h"
27 #include "base/compiler_specific.h"
28 #include "base/containers/adapters.h"
29 #include "base/containers/contains.h"
30@@ -2153,6 +2154,8 @@ void TabStrip::OnMouseEventInTab(views::
31 }
32
33 void TabStrip::UpdateHoverCard(Tab* tab, HoverCardUpdateType update_type) {
34+ if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("tab-hover-cards") == "tooltip" ||
35+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("tab-hover-cards") == "none") return;
36 // Some operations (including e.g. starting a drag) can cause the tab focus
37 // to change at the same time as the tabstrip is starting to animate; the
38 // hover card should not be visible at this time.
39--- chrome/browser/ungoogled_flag_choices.h.orig
40+++ chrome/browser/ungoogled_flag_choices.h
41@@ -75,4 +75,13 @@ const FeatureEntry::Choice kCloseConfirm
42 "close-confirmation",
43 "multiple"},
44 };
45+const FeatureEntry::Choice kTabHoverCards[] = {
46+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
47+ {"None",
48+ "tab-hover-cards",
49+ "none"},
50+ {"Tooltip",
51+ "tab-hover-cards",
52+ "tooltip"},
53+};
54 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
55--- chrome/browser/ungoogled_flag_entries.h.orig
56+++ chrome/browser/ungoogled_flag_entries.h
57@@ -88,4 +88,8 @@
58 "Custom New Tab Page",
59 "Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page. ungoogled-chromium flag",
60 kOsDesktop, ORIGIN_LIST_VALUE_TYPE("custom-ntp", "")},
61+ {"tab-hover-cards",
62+ "Tab Hover Cards",
63+ "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.",
64+ kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)},
65 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
deleted file mode 100644
index 317602c..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1--- chrome/browser/ui/browser_command_controller.cc.orig
2+++ chrome/browser/ui/browser_command_controller.cc
3@@ -1139,7 +1139,8 @@ void BrowserCommandController::InitComma
4 command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
5 normal_window);
6
7- const bool enable_tab_search_commands = browser_->is_type_normal();
8+ const bool enable_tab_search_commands = browser_->is_type_normal() &&
9+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button");
10 command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH,
11 enable_tab_search_commands);
12 command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
13--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig
14+++ chrome/browser/ui/views/frame/tab_strip_region_view.cc
15@@ -5,6 +5,7 @@
16 #include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
17
18 #include "base/bind.h"
19+#include "base/command_line.h"
20 #include "base/strings/utf_string_conversions.h"
21 #include "build/build_config.h"
22 #include "chrome/browser/themes/theme_properties.h"
23@@ -132,7 +133,8 @@ TabStripRegionView::TabStripRegionView(s
24 return;
25 #endif
26 const Browser* browser = tab_strip_->controller()->GetBrowser();
27- if (browser && browser->is_type_normal()) {
28+ if (browser && browser->is_type_normal() &&
29+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button")) {
30 auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_);
31 tab_search_button->SetTooltipText(
32 l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH));
33--- chrome/browser/ungoogled_flag_entries.h.orig
34+++ chrome/browser/ungoogled_flag_entries.h
35@@ -68,4 +68,8 @@
36 "Clear data on exit",
37 "Clears all browsing data on exit. ungoogled-chromium flag",
38 kOsDesktop, FEATURE_VALUE_TYPE(browsing_data::features::kClearDataOnExit)},
39+ {"remove-tabsearch-button",
40+ "Remove Tabsearch Button",
41+ "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
42+ kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
43 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch
deleted file mode 100644
index 070c4cd..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1--- chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc.orig
2+++ chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc
3@@ -24,6 +24,7 @@
4 #include "chrome/browser/profiles/profile.h"
5 #include "chrome/browser/profiles/profile_manager.h"
6 #include "chrome/browser/sync/sync_service_factory.h"
7+#include "components/browsing_data/core/features.h"
8 #include "components/browsing_data/core/pref_names.h"
9 #include "components/keep_alive_registry/keep_alive_types.h"
10 #include "components/keep_alive_registry/scoped_keep_alive.h"
11@@ -151,6 +152,21 @@ class BrowsingDataRemoverObserver
12 #endif
13 };
14
15+uint64_t AllOriginTypeMask() {
16+ return content::BrowsingDataRemover::ORIGIN_TYPE_PROTECTED_WEB |
17+ content::BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB;
18+}
19+
20+uint64_t AllRemoveMask() {
21+ return content::BrowsingDataRemover::DATA_TYPE_CACHE |
22+ content::BrowsingDataRemover::DATA_TYPE_DOWNLOADS |
23+ chrome_browsing_data_remover::DATA_TYPE_CONTENT_SETTINGS |
24+ chrome_browsing_data_remover::DATA_TYPE_FORM_DATA |
25+ chrome_browsing_data_remover::DATA_TYPE_HISTORY |
26+ chrome_browsing_data_remover::DATA_TYPE_PASSWORDS |
27+ chrome_browsing_data_remover::DATA_TYPE_SITE_DATA;
28+}
29+
30 uint64_t GetOriginTypeMask(const base::Value& data_types) {
31 uint64_t result = 0;
32 for (const auto& data_type : data_types.GetList()) {
33@@ -292,8 +308,9 @@ void ChromeBrowsingDataLifetimeManager::
34 bool keep_browser_alive) {
35 auto* data_types = profile_->GetPrefs()->GetList(
36 browsing_data::prefs::kClearBrowsingDataOnExitList);
37- if (data_types && !data_types->GetList().empty() &&
38- !SyncServiceFactory::IsSyncAllowed(profile_)) {
39+ bool cdoe = base::FeatureList::IsEnabled(browsing_data::features::kClearDataOnExit);
40+ if (cdoe || (data_types && !data_types->GetList().empty() &&
41+ !SyncServiceFactory::IsSyncAllowed(profile_))) {
42 profile_->GetPrefs()->SetBoolean(
43 browsing_data::prefs::kClearBrowsingDataOnExitDeletionPending, true);
44 auto* remover = profile_->GetBrowsingDataRemover();
45@@ -304,8 +321,8 @@ void ChromeBrowsingDataLifetimeManager::
46 DCHECK(keep_browser_alive);
47 #endif
48 remover->RemoveAndReply(base::Time(), base::Time::Max(),
49- GetRemoveMask(*data_types),
50- GetOriginTypeMask(*data_types),
51+ cdoe ? AllRemoveMask() : GetRemoveMask(*data_types),
52+ cdoe ? AllOriginTypeMask() : GetOriginTypeMask(*data_types),
53 BrowsingDataRemoverObserver::Create(
54 remover, /*filterable_deletion=*/true, profile_,
55 keep_browser_alive));
56--- chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager_factory.cc.orig
57+++ chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager_factory.cc
58@@ -48,6 +48,8 @@ ChromeBrowsingDataLifetimeManagerFactory
59 KeyedService* ChromeBrowsingDataLifetimeManagerFactory::BuildServiceInstanceFor(
60 content::BrowserContext* context) const {
61 if (!base::FeatureList::IsEnabled(
62+ browsing_data::features::kClearDataOnExit) &&
63+ !base::FeatureList::IsEnabled(
64 browsing_data::features::kEnableBrowsingDataLifetimeManager))
65 return nullptr;
66 Profile* profile = Profile::FromBrowserContext(context);
67--- chrome/browser/ungoogled_flag_entries.h.orig
68+++ chrome/browser/ungoogled_flag_entries.h
69@@ -64,4 +64,8 @@
70 "Keep old history",
71 "Keep history older than 3 months. ungoogled-chromium flag",
72 kOsAll, SINGLE_VALUE_TYPE("keep-old-history")},
73+ {"clear-data-on-exit",
74+ "Clear data on exit",
75+ "Clears all browsing data on exit. ungoogled-chromium flag",
76+ kOsDesktop, FEATURE_VALUE_TYPE(browsing_data::features::kClearDataOnExit)},
77 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
78--- components/browsing_data/core/features.cc.orig
79+++ components/browsing_data/core/features.cc
80@@ -19,5 +19,7 @@ const base::Feature kEnableBrowsingDataL
81 const base::Feature kEnableBrowsingDataLifetimeManager{
82 "BrowsingDataLifetimeManager", base::FEATURE_ENABLED_BY_DEFAULT};
83 #endif
84+
85+const base::Feature kClearDataOnExit{"ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT};
86 } // namespace features
87 } // namespace browsing_data
88--- components/browsing_data/core/features.h.orig
89+++ components/browsing_data/core/features.h
90@@ -17,6 +17,7 @@ extern const base::Feature kEnableRemovi
91 // defined by the BrowsingDataLifetime policy.
92 extern const base::Feature kEnableBrowsingDataLifetimeManager;
93
94+extern const base::Feature kClearDataOnExit;
95 } // namespace features
96 } // namespace browsing_data
97
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch
deleted file mode 100644
index b0358e8..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1--- chrome/browser/ui/tabs/tab_strip_model.cc.orig
2+++ chrome/browser/ui/tabs/tab_strip_model.cc
3@@ -11,6 +11,7 @@
4 #include <utility>
5
6 #include "base/auto_reset.h"
7+#include "base/command_line.h"
8 #include "base/containers/flat_map.h"
9 #include "base/cxx17_backports.h"
10 #include "base/metrics/histogram_macros.h"
11@@ -1779,6 +1780,10 @@ bool TabStripModel::CloseTabs(base::span
12 if (items.empty())
13 return true;
14
15+ const std::string flag_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("close-window-with-last-tab");
16+ if (flag_value == "never" && !closing_all_ && items.size() == count())
17+ delegate()->AddTabAt(GURL(), -1, true);
18+
19 const bool closing_all = static_cast<int>(items.size()) == count();
20 base::WeakPtr<TabStripModel> ref = weak_factory_.GetWeakPtr();
21 if (closing_all) {
22--- chrome/browser/ungoogled_flag_choices.h.orig
23+++ chrome/browser/ungoogled_flag_choices.h
24@@ -60,4 +60,10 @@ const FeatureEntry::Choice kOmniboxAutoc
25 "omnibox-autocomplete-filtering",
26 "search-bookmarks-chrome"},
27 };
28+const FeatureEntry::Choice kCloseWindowWithLastTab[] = {
29+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
30+ {"Never",
31+ "close-window-with-last-tab",
32+ "never"},
33+};
34 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
35--- chrome/browser/ungoogled_flag_entries.h.orig
36+++ chrome/browser/ungoogled_flag_entries.h
37@@ -52,4 +52,8 @@
38 "Omnibox Autocomplete Filtering",
39 "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. ungoogled-chromium flag.",
40 kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)},
41+ {"close-window-with-last-tab",
42+ "Close window with last tab",
43+ "Determines whether a window should close once the last tab is closed. ungoogled-chromium flag.",
44+ kOsDesktop, MULTI_VALUE_TYPE(kCloseWindowWithLastTab)},
45 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch
deleted file mode 100644
index 381de61..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch
+++ /dev/null
@@ -1,120 +0,0 @@
1# Add extension-mime-request-handling chrome://flag to tweak the behavior of
2# extension MIME types
3
4--- chrome/browser/download/download_crx_util.cc.orig
5+++ chrome/browser/download/download_crx_util.cc
6@@ -8,6 +8,7 @@
7
8 #include <memory>
9
10+#include "base/command_line.h"
11 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/extensions/crx_installer.h"
13 #include "chrome/browser/extensions/extension_install_prompt.h"
14@@ -128,6 +129,14 @@ scoped_refptr<extensions::CrxInstaller>
15 return installer;
16 }
17
18+bool ShouldDownloadAsRegularFile() {
19+ const base::CommandLine& command_line =
20+ *base::CommandLine::ForCurrentProcess();
21+ return command_line.HasSwitch("extension-mime-request-handling") &&
22+ command_line.GetSwitchValueASCII("extension-mime-request-handling") ==
23+ "download-as-regular-file";
24+}
25+
26 bool IsExtensionDownload(const DownloadItem& download_item) {
27 if (download_item.GetTargetDisposition() ==
28 DownloadItem::TARGET_DISPOSITION_PROMPT)
29@@ -136,7 +145,7 @@ bool IsExtensionDownload(const DownloadI
30 if (download_item.GetMimeType() == extensions::Extension::kMimeType ||
31 extensions::UserScript::IsURLUserScript(download_item.GetURL(),
32 download_item.GetMimeType())) {
33- return true;
34+ return !ShouldDownloadAsRegularFile();
35 } else {
36 return false;
37 }
38--- chrome/browser/download/download_crx_util.h.orig
39+++ chrome/browser/download/download_crx_util.h
40@@ -43,6 +43,10 @@ scoped_refptr<extensions::CrxInstaller>
41 Profile* profile,
42 const download::DownloadItem& download_item);
43
44+// Returns true if the user wants all extensions to be downloaded as regular
45+// files.
46+bool ShouldDownloadAsRegularFile();
47+
48 // Returns true if this is an extension download. This also considers user
49 // scripts to be extension downloads, since we convert those automatically.
50 bool IsExtensionDownload(const download::DownloadItem& download_item);
51--- chrome/browser/download/download_target_determiner.cc.orig
52+++ chrome/browser/download/download_target_determiner.cc
53@@ -1059,10 +1059,12 @@ DownloadConfirmationReason DownloadTarge
54 return DownloadConfirmationReason::SAVE_AS;
55
56 #if BUILDFLAG(ENABLE_EXTENSIONS)
57- // Don't prompt for extension downloads if the installation site is white
58- // listed.
59- if (download_crx_util::IsTrustedExtensionDownload(GetProfile(), *download_))
60- return DownloadConfirmationReason::NONE;
61+ if (!download_crx_util::ShouldDownloadAsRegularFile()) {
62+ // Don't prompt for extension downloads.
63+ if (download_crx_util::IsTrustedExtensionDownload(GetProfile(), *download_) ||
64+ filename.MatchesExtension(extensions::kExtensionFileExtension))
65+ return DownloadConfirmationReason::NONE;
66+ }
67 #endif
68
69 // Don't prompt for file types that are marked for opening automatically.
70--- chrome/browser/extensions/extension_management.cc.orig
71+++ chrome/browser/extensions/extension_management.cc
72@@ -10,6 +10,7 @@
73
74 #include "base/bind.h"
75 #include "base/callback_helpers.h"
76+#include "base/command_line.h"
77 #include "base/containers/contains.h"
78 #include "base/logging.h"
79 #include "base/metrics/histogram_functions.h"
80@@ -250,6 +251,13 @@ bool ExtensionManagement::IsInstallation
81 bool ExtensionManagement::IsOffstoreInstallAllowed(
82 const GURL& url,
83 const GURL& referrer_url) const {
84+ const base::CommandLine& command_line =
85+ *base::CommandLine::ForCurrentProcess();
86+ if (command_line.HasSwitch("extension-mime-request-handling") &&
87+ command_line.GetSwitchValueASCII("extension-mime-request-handling") ==
88+ "always-prompt-for-install") {
89+ return true;
90+ }
91 // No allowed install sites specified, disallow by default.
92 if (!global_settings_->has_restricted_install_sources)
93 return false;
94--- chrome/browser/ungoogled_flag_choices.h.orig
95+++ chrome/browser/ungoogled_flag_choices.h
96@@ -4,4 +4,13 @@
97
98 #ifndef CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
99 #define CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
100+const FeatureEntry::Choice kExtensionHandlingChoices[] = {
101+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
102+ {"Download as regular file",
103+ "extension-mime-request-handling",
104+ "download-as-regular-file"},
105+ {"Always prompt for install",
106+ "extension-mime-request-handling",
107+ "always-prompt-for-install"},
108+};
109 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
110--- chrome/browser/ungoogled_flag_entries.h.orig
111+++ chrome/browser/ungoogled_flag_entries.h
112@@ -12,4 +12,8 @@
113 "Enable stacking in the tab strip",
114 "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior. ungoogled-chromium flag.",
115 kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")},
116+ {"extension-mime-request-handling",
117+ "Handling of extension MIME type requests",
118+ "Used when deciding how to handle a request for a CRX or User Script MIME type. ungoogled-chromium flag.",
119+ kOsAll, MULTI_VALUE_TYPE(kExtensionHandlingChoices)},
120 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch
deleted file mode 100644
index 9a31082..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1# Make popups go to tabs instead
2
3--- chrome/browser/ungoogled_flag_entries.h.orig
4+++ chrome/browser/ungoogled_flag_entries.h
5@@ -56,4 +56,8 @@
6 "Close window with last tab",
7 "Determines whether a window should close once the last tab is closed. ungoogled-chromium flag.",
8 kOsDesktop, MULTI_VALUE_TYPE(kCloseWindowWithLastTab)},
9+ {"popups-to-tabs",
10+ "Popups to tabs",
11+ "Makes popups open in new tabs. ungoogled-chromium flag",
12+ kOsAll, SINGLE_VALUE_TYPE("popups-to-tabs")},
13 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
14--- content/renderer/render_view_impl.cc.orig
15+++ content/renderer/render_view_impl.cc
16@@ -73,6 +73,8 @@ WindowOpenDisposition RenderViewImpl::Na
17 case blink::kWebNavigationPolicyNewWindow:
18 return WindowOpenDisposition::NEW_WINDOW;
19 case blink::kWebNavigationPolicyNewPopup:
20+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("popups-to-tabs"))
21+ return WindowOpenDisposition::NEW_FOREGROUND_TAB;
22 return WindowOpenDisposition::NEW_POPUP;
23 default:
24 NOTREACHED() << "Unexpected WebNavigationPolicy";
25--- ui/base/mojom/window_open_disposition_mojom_traits.h.orig
26+++ ui/base/mojom/window_open_disposition_mojom_traits.h
27@@ -5,6 +5,7 @@
28 #ifndef UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_TRAITS_H_
29 #define UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_TRAITS_H_
30
31+#include "base/command_line.h"
32 #include "base/notreached.h"
33 #include "mojo/public/cpp/bindings/enum_traits.h"
34 #include "ui/base/mojom/window_open_disposition.mojom.h"
35@@ -28,6 +29,8 @@ struct EnumTraits<ui::mojom::WindowOpenD
36 case WindowOpenDisposition::NEW_BACKGROUND_TAB:
37 return ui::mojom::WindowOpenDisposition::NEW_BACKGROUND_TAB;
38 case WindowOpenDisposition::NEW_POPUP:
39+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("popups-to-tabs"))
40+ return ui::mojom::WindowOpenDisposition::NEW_FOREGROUND_TAB;
41 return ui::mojom::WindowOpenDisposition::NEW_POPUP;
42 case WindowOpenDisposition::NEW_WINDOW:
43 return ui::mojom::WindowOpenDisposition::NEW_WINDOW;
44@@ -63,6 +66,8 @@ struct EnumTraits<ui::mojom::WindowOpenD
45 return true;
46 case ui::mojom::WindowOpenDisposition::NEW_POPUP:
47 *out = WindowOpenDisposition::NEW_POPUP;
48+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("popups-to-tabs"))
49+ *out = WindowOpenDisposition::NEW_FOREGROUND_TAB;
50 return true;
51 case ui::mojom::WindowOpenDisposition::NEW_WINDOW:
52 *out = WindowOpenDisposition::NEW_WINDOW;
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch
deleted file mode 100644
index c46ec2b..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1# Add --disable-beforeunload to always disable beforeunload JavaScript dialogs
2
3--- chrome/browser/ungoogled_flag_entries.h.orig
4+++ chrome/browser/ungoogled_flag_entries.h
5@@ -20,4 +20,8 @@
6 "Disable search engine collection",
7 "Prevents search engines from being added automatically. ungoogled-chromium flag.",
8 kOsAll, SINGLE_VALUE_TYPE("disable-search-engine-collection")},
9+ {"disable-beforeunload",
10+ "Disable beforeunload",
11+ "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.",
12+ kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")},
13 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
14--- components/javascript_dialogs/app_modal_dialog_manager.cc.orig
15+++ components/javascript_dialogs/app_modal_dialog_manager.cc
16@@ -8,6 +8,7 @@
17 #include <utility>
18
19 #include "base/bind.h"
20+#include "base/command_line.h"
21 #include "base/i18n/rtl.h"
22 #include "base/macros.h"
23 #include "base/metrics/histogram_macros.h"
24@@ -196,7 +197,8 @@ void AppModalDialogManager::RunBeforeUnl
25 ChromeJavaScriptDialogExtraData* extra_data =
26 &javascript_dialog_extra_data_[web_contents];
27
28- if (extra_data->suppress_javascript_messages_) {
29+ if (extra_data->suppress_javascript_messages_
30+ || base::CommandLine::ForCurrentProcess()->HasSwitch("disable-beforeunload")) {
31 // If a site harassed the user enough for them to put it on mute, then it
32 // lost its privilege to deny unloading.
33 std::move(callback).Run(true, std::u16string());
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch
deleted file mode 100644
index 090432a..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1# Keep local history longer than 90 days
2
3--- chrome/browser/ungoogled_flag_entries.h.orig
4+++ chrome/browser/ungoogled_flag_entries.h
5@@ -60,4 +60,8 @@
6 "Popups to tabs",
7 "Makes popups open in new tabs. ungoogled-chromium flag",
8 kOsAll, SINGLE_VALUE_TYPE("popups-to-tabs")},
9+ {"keep-old-history",
10+ "Keep old history",
11+ "Keep history older than 3 months. ungoogled-chromium flag",
12+ kOsAll, SINGLE_VALUE_TYPE("keep-old-history")},
13 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
14--- components/history/core/browser/history_backend.cc.orig
15+++ components/history/core/browser/history_backend.cc
16@@ -15,6 +15,7 @@
17 #include <vector>
18
19 #include "base/bind.h"
20+#include "base/command_line.h"
21 #include "base/callback_helpers.h"
22 #include "base/compiler_specific.h"
23 #include "base/containers/flat_set.h"
24@@ -911,7 +912,8 @@ void HistoryBackend::InitImpl(
25 db_->GetStartDate(&first_recorded_time_);
26
27 // Start expiring old stuff.
28- expirer_.StartExpiringOldStuff(base::Days(kExpireDaysThreshold));
29+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("keep-old-history"))
30+ expirer_.StartExpiringOldStuff(base::Days(kExpireDaysThreshold));
31
32 LOCAL_HISTOGRAM_TIMES("History.InitTime", TimeTicks::Now() - beginning_time);
33 }
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch
deleted file mode 100644
index be26b2c..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1# Add flag to force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs) to mitigate homograph attacks
2
3--- chrome/browser/ungoogled_flag_entries.h.orig
4+++ chrome/browser/ungoogled_flag_entries.h
5@@ -24,4 +24,8 @@
6 "Disable beforeunload",
7 "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.",
8 kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")},
9+ {"force-punycode-hostnames",
10+ "Force punycode hostnames",
11+ "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.",
12+ kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")},
13 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
14--- components/url_formatter/url_formatter.cc.orig
15+++ components/url_formatter/url_formatter.cc
16@@ -8,6 +8,7 @@
17 #include <utility>
18 #include <vector>
19
20+#include "base/command_line.h"
21 #include "base/lazy_instance.h"
22 #include "base/numerics/safe_conversions.h"
23 #include "base/strings/strcat.h"
24@@ -264,6 +265,13 @@ IDNConversionResult IDNToUnicodeWithAdju
25 host16.reserve(host.length());
26 host16.insert(host16.end(), host.begin(), host.end());
27
28+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("force-punycode-hostnames")) {
29+ // Leave as punycode.
30+ IDNConversionResult result;
31+ result.result = host16;
32+ return result;
33+ }
34+
35 // Compute the top level domain to be used in spoof checks later.
36 base::StringPiece top_level_domain;
37 std::u16string top_level_domain_unicode;
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch
deleted file mode 100644
index 87da094..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1# Add flag --hide-crashed-bubble to hide the bubble box:
2# "Restore Pages? Chromium didn't shut down correctly."
3
4--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig
5+++ chrome/browser/ui/startup/startup_browser_creator_impl.cc
6@@ -648,7 +648,8 @@ void StartupBrowserCreatorImpl::AddInfoB
7 if (command_line_.HasSwitch(switches::kKioskMode))
8 return;
9
10- if (HasPendingUncleanExit(browser->profile()))
11+ if (HasPendingUncleanExit(browser->profile()) &&
12+ !command_line_.HasSwitch("hide-crashed-bubble"))
13 SessionCrashedBubble::ShowIfNotOffTheRecordProfile(
14 browser, /*skip_tab_checking=*/false);
15
16--- chrome/browser/ungoogled_flag_entries.h.orig
17+++ chrome/browser/ungoogled_flag_entries.h
18@@ -32,4 +32,8 @@
19 "Show avatar/people/profile button",
20 "Show avatar/people/profile button in the browser toolbar. ungoogled-chromium flag.",
21 kOsDesktop, MULTI_VALUE_TYPE(kShowAvatarButtonChoices)},
22+ {"hide-crashed-bubble",
23+ "Hide crashed bubble",
24+ "Hides the bubble box with the message \"Restore Pages? Chromium didn't shut down correctly.\" that shows on startup after the browser did not exit cleanly. ungoogled-chromium flag.",
25+ kOsAll, SINGLE_VALUE_TYPE("hide-crashed-bubble")},
26 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch
deleted file mode 100644
index 7937d6f..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1--- chrome/browser/ui/views/tabs/tab_strip.cc.orig
2+++ chrome/browser/ui/views/tabs/tab_strip.cc
3@@ -1909,6 +1909,8 @@ bool TabStrip::SupportsMultipleSelection
4 }
5
6 bool TabStrip::ShouldHideCloseButtonForTab(Tab* tab) const {
7+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons"))
8+ return true;
9 if (tab->IsActive())
10 return false;
11 return !!touch_layout_;
12--- chrome/browser/ungoogled_flag_entries.h.orig
13+++ chrome/browser/ungoogled_flag_entries.h
14@@ -92,4 +92,8 @@
15 "Tab Hover Cards",
16 "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.",
17 kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)},
18+ {"hide-tab-close-buttons",
19+ "Hide tab close buttons",
20+ "Hides the close buttons on tabs. ungoogled-chromium flag.",
21+ kOsDesktop, SINGLE_VALUE_TYPE("hide-tab-close-buttons")},
22 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch
deleted file mode 100644
index d657480..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1--- chrome/browser/ui/views/frame/browser_root_view.cc.orig
2+++ chrome/browser/ui/views/frame/browser_root_view.cc
3@@ -11,6 +11,7 @@
4
5 #include "base/bind.h"
6 #include "base/callback_helpers.h"
7+#include "base/command_line.h"
8 #include "base/metrics/user_metrics.h"
9 #include "base/task/post_task.h"
10 #include "base/task/thread_pool.h"
11@@ -109,6 +110,18 @@ DragOperation GetDropEffect(const ui::Dr
12 return DragOperation::kMove;
13 }
14
15+bool ShouldScrollChangesTab() {
16+ const std::string flag_value =
17+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("scroll-tabs");
18+
19+ if (flag_value == "always")
20+ return true;
21+ else if (flag_value == "never")
22+ return false;
23+
24+ return browser_defaults::kScrollEventChangesTab;
25+}
26+
27 } // namespace
28
29 BrowserRootView::DropInfo::DropInfo() = default;
30@@ -120,7 +133,9 @@ BrowserRootView::DropInfo::~DropInfo() {
31
32 BrowserRootView::BrowserRootView(BrowserView* browser_view,
33 views::Widget* widget)
34- : views::internal::RootView(widget), browser_view_(browser_view) {}
35+ : views::internal::RootView(widget), browser_view_(browser_view) {
36+ scroll_event_changes_tab_ = ShouldScrollChangesTab();
37+}
38
39 BrowserRootView::~BrowserRootView() {
40 // It's possible to destroy the browser while a drop is active. In this case,
41@@ -245,7 +260,7 @@ bool BrowserRootView::OnMouseWheel(const
42
43 // Scroll-event-changes-tab is incompatible with scrolling tabstrip, so
44 // disable it if the latter feature is enabled.
45- if (browser_defaults::kScrollEventChangesTab &&
46+ if (scroll_event_changes_tab_ &&
47 !base::FeatureList::IsEnabled(features::kScrollableTabStrip)) {
48 // Switch to the left/right tab if the wheel-scroll happens over the
49 // tabstrip, or the empty space beside the tabstrip.
50--- chrome/browser/ui/views/frame/browser_root_view.h.orig
51+++ chrome/browser/ui/views/frame/browser_root_view.h
52@@ -143,6 +143,8 @@ class BrowserRootView : public views::in
53 int scroll_remainder_x_ = 0;
54 int scroll_remainder_y_ = 0;
55
56+ bool scroll_event_changes_tab_ = false;
57+
58 std::unique_ptr<DropInfo> drop_info_;
59
60 base::WeakPtrFactory<BrowserRootView> weak_ptr_factory_{this};
61--- chrome/browser/ungoogled_flag_choices.h.orig
62+++ chrome/browser/ungoogled_flag_choices.h
63@@ -25,4 +25,13 @@ const FeatureEntry::Choice kShowAvatarBu
64 "show-avatar-button",
65 "never"}
66 };
67+const FeatureEntry::Choice kScrollEventChangesTab[] = {
68+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
69+ {"Always",
70+ "scroll-tabs",
71+ "always"},
72+ {"Never",
73+ "scroll-tabs",
74+ "never"}
75+};
76 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
77--- chrome/browser/ungoogled_flag_entries.h.orig
78+++ chrome/browser/ungoogled_flag_entries.h
79@@ -36,4 +36,8 @@
80 "Hide crashed bubble",
81 "Hides the bubble box with the message \"Restore Pages? Chromium didn't shut down correctly.\" that shows on startup after the browser did not exit cleanly. ungoogled-chromium flag.",
82 kOsAll, SINGLE_VALUE_TYPE("hide-crashed-bubble")},
83+ {"scroll-tabs",
84+ "Scroll switches tab",
85+ "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.",
86+ kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)},
87 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-show-avatar-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-show-avatar-button.patch
deleted file mode 100644
index 8fe39bd..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-show-avatar-button.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1--- chrome/browser/ui/views/toolbar/toolbar_view.cc.orig
2+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
3@@ -273,12 +273,28 @@ void ToolbarView::Init() {
4
5 std::unique_ptr<ToolbarAccountIconContainerView>
6 toolbar_account_icon_container;
7+
8+ const base::CommandLine& command_line =
9+ *base::CommandLine::ForCurrentProcess();
10+ const std::string flag_value =
11+ command_line.GetSwitchValueASCII("show-avatar-button");
12+
13+ bool in_incognito_or_guest_mode = browser_->profile()->IsOffTheRecord() ||
14+ browser_->profile()->IsGuestSession();
15+
16 bool show_avatar_toolbar_button = true;
17 #if BUILDFLAG(IS_CHROMEOS_ASH)
18 // ChromeOS only badges Incognito and Guest icons in the browser window.
19- show_avatar_toolbar_button = browser_->profile()->IsOffTheRecord() ||
20- browser_->profile()->IsGuestSession();
21+ show_avatar_toolbar_button = in_incognito_or_guest_mode;
22 #endif
23+
24+ if (flag_value == "always")
25+ show_avatar_toolbar_button = true;
26+ else if (flag_value == "incognito-and-guest")
27+ show_avatar_toolbar_button = in_incognito_or_guest_mode;
28+ else if (flag_value == "never")
29+ show_avatar_toolbar_button = false;
30+
31 if (base::FeatureList::IsEnabled(
32 autofill::features::kAutofillEnableToolbarStatusChip)) {
33 // The avatar button is contained inside the page-action container and
34--- chrome/browser/ungoogled_flag_choices.h.orig
35+++ chrome/browser/ungoogled_flag_choices.h
36@@ -13,4 +13,16 @@ const FeatureEntry::Choice kExtensionHan
37 "extension-mime-request-handling",
38 "always-prompt-for-install"},
39 };
40+const FeatureEntry::Choice kShowAvatarButtonChoices[] = {
41+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
42+ {"Always",
43+ "show-avatar-button",
44+ "always"},
45+ {"Incognito and Guest",
46+ "show-avatar-button",
47+ "incognito-and-guest"},
48+ {"Never",
49+ "show-avatar-button",
50+ "never"}
51+};
52 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
53--- chrome/browser/ungoogled_flag_entries.h.orig
54+++ chrome/browser/ungoogled_flag_entries.h
55@@ -28,4 +28,8 @@
56 "Force punycode hostnames",
57 "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.",
58 kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")},
59+ {"show-avatar-button",
60+ "Show avatar/people/profile button",
61+ "Show avatar/people/profile button in the browser toolbar. ungoogled-chromium flag.",
62+ kOsDesktop, MULTI_VALUE_TYPE(kShowAvatarButtonChoices)},
63 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch
deleted file mode 100644
index 6e19e76..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1# Add --enable-stacked-tab-strip and --enable-tab-adjust-layout flags to tweak tab strip behavior
2
3--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc.orig
4+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
5@@ -83,14 +83,13 @@ using content::WebContents;
6 namespace {
7
8 bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {
9- *adjust_layout = false;
10- // For ash, always allow entering stacked mode.
11 #if BUILDFLAG(IS_CHROMEOS_ASH)
12 *adjust_layout = true;
13 return prefs->GetBoolean(prefs::kTabStripStackedLayout);
14 #else
15- return base::CommandLine::ForCurrentProcess()->HasSwitch(
16- switches::kForceStackedTabStripLayout);
17+ *adjust_layout = base::CommandLine::ForCurrentProcess()->HasSwitch("enable-tab-adjust-layout");
18+ return prefs->GetBoolean(prefs::kTabStripStackedLayout) ||
19+ base::CommandLine::ForCurrentProcess()->HasSwitch("enable-stacked-tab-strip");
20 #endif
21 }
22
23--- chrome/browser/ungoogled_flag_entries.h.orig
24+++ chrome/browser/ungoogled_flag_entries.h
25@@ -8,4 +8,8 @@
26 "SetIpv6ProbeFalse",
27 "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.",
28 kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)},
29+ {"enable-stacked-tab-strip",
30+ "Enable stacking in the tab strip",
31+ "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior. ungoogled-chromium flag.",
32+ kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")},
33 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch
deleted file mode 100644
index 0bc5dd5..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1# Disables IPv6 probing and adds an option to change the IPv6 probing result
2
3--- chrome/browser/ungoogled_flag_entries.h.orig
4+++ chrome/browser/ungoogled_flag_entries.h
5@@ -4,4 +4,8 @@
6
7 #ifndef CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
8 #define CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
9+ {"set-ipv6-probe-false",
10+ "SetIpv6ProbeFalse",
11+ "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.",
12+ kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)},
13 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
14--- net/base/features.cc.orig
15+++ net/base/features.cc
16@@ -263,5 +263,7 @@ const base::Feature kPartitionedCookies{
17 const base::Feature kExtraCookieValidityChecks{
18 "ExtraCookieValidityChecks", base::FEATURE_ENABLED_BY_DEFAULT};
19
20+const base::Feature kSetIpv6ProbeFalse{"SetIpv6ProbeFalse", base::FEATURE_DISABLED_BY_DEFAULT};
21+
22 } // namespace features
23 } // namespace net
24--- net/base/features.h.orig
25+++ net/base/features.h
26@@ -396,6 +396,8 @@ NET_EXPORT extern const base::Feature kP
27 // feature flag, assuming no breakage occurs with it enabled.
28 NET_EXPORT extern const base::Feature kExtraCookieValidityChecks;
29
30+NET_EXPORT extern const base::Feature kSetIpv6ProbeFalse;
31+
32 } // namespace features
33 } // namespace net
34
35--- net/dns/host_resolver_manager.cc.orig
36+++ net/dns/host_resolver_manager.cc
37@@ -139,11 +139,6 @@ const unsigned kMinimumTTLSeconds = kCac
38 // cached.
39 const int kIPv6ProbePeriodMs = 1000;
40
41-// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted), used for IPv6 probes.
42-const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x07, 0xfd, 0x00, 0x00,
43- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44- 0x00, 0x00, 0x00, 0x01};
45-
46 enum DnsResolveStatus {
47 RESOLVE_STATUS_DNS_SUCCESS = 0,
48 RESOLVE_STATUS_PROC_SUCCESS,
49@@ -3696,7 +3691,7 @@ bool HostResolverManager::IsIPv6Reachabl
50 (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
51 kIPv6ProbePeriodMs) {
52 SetLastIPv6ProbeResult(
53- IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log));
54+ !base::FeatureList::IsEnabled(features::kSetIpv6ProbeFalse));
55 cached = false;
56 }
57 net_log.AddEvent(
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-suggestions-url-field.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-suggestions-url-field.patch
deleted file mode 100644
index 9ff8cfa..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-suggestions-url-field.patch
+++ /dev/null
@@ -1,461 +0,0 @@
1# Add suggestions URL text field to the search engine editing dialog
2# (chrome://settings/searchEngines).
3
4--- chrome/browser/resources/settings/search_engines_page/search_engine_dialog.html.orig
5+++ chrome/browser/resources/settings/search_engines_page/search_engine_dialog.html
6@@ -20,6 +20,13 @@
7 value="{{queryUrl_}}" on-focus="validate_" on-input="validate_"
8 disabled$="[[model.urlLocked]]">
9 </cr-input>
10+ <cr-input id="suggestionsUrl"
11+ label="Suggestions URL with %s in place of query"
12+ error-message="$i18n{notValid}"
13+ value="{{suggestionsUrl_}}"
14+ on-focus="validate_" on-input="validate_"
15+ disabled$="[[model.urlLocked]]">
16+ </cr-input>
17 </div>
18 <div slot="button-container">
19 <cr-button class="cancel-button" on-click="cancel_" id="cancel">
20--- chrome/browser/resources/settings/search_engines_page/search_engine_dialog.ts.orig
21+++ chrome/browser/resources/settings/search_engines_page/search_engine_dialog.ts
22@@ -26,6 +26,7 @@ interface SettingsSearchEngineDialogElem
23 dialog: CrDialogElement,
24 keyword: CrInputElement,
25 queryUrl: CrInputElement,
26+ suggestionsUrl: CrInputElement,
27 searchEngine: CrInputElement,
28 };
29 }
30@@ -54,6 +55,7 @@ class SettingsSearchEngineDialogElement
31 searchEngine_: String,
32 keyword_: String,
33 queryUrl_: String,
34+ suggestionsUrl_: String,
35 dialogTitle_: String,
36 actionButtonText_: String,
37 };
38@@ -63,6 +65,7 @@ class SettingsSearchEngineDialogElement
39 private searchEngine_: string;
40 private keyword_: string;
41 private queryUrl_: string;
42+ private suggestionsUrl_: string;
43 private dialogTitle_: string;
44 private actionButtonText_: string;
45 private browserProxy_: SearchEnginesBrowserProxy =
46@@ -92,6 +95,7 @@ class SettingsSearchEngineDialogElement
47 this.searchEngine_ = this.model.name;
48 this.keyword_ = this.model.keyword;
49 this.queryUrl_ = this.model.url;
50+ this.suggestionsUrl_ = this.model.suggestionsUrl;
51 } else {
52 this.dialogTitle_ =
53 loadTimeData.getString('searchEnginesAddSearchEngine');
54@@ -127,8 +131,12 @@ class SettingsSearchEngineDialogElement
55 }
56 }
57
58- [this.$.searchEngine, this.$.keyword, this.$.queryUrl].forEach(
59- element => this.validateElement_(element));
60+ [
61+ this.$.searchEngine,
62+ this.$.keyword,
63+ this.$.queryUrl,
64+ this.$.suggestionsUrl
65+ ].forEach(element => this.validateElement_(element));
66 }
67
68 private cancel_() {
69@@ -137,7 +145,8 @@ class SettingsSearchEngineDialogElement
70
71 private onActionButtonTap_() {
72 this.browserProxy_.searchEngineEditCompleted(
73- this.searchEngine_, this.keyword_, this.queryUrl_);
74+ this.searchEngine_, this.keyword_, this.queryUrl_,
75+ this.suggestionsUrl_);
76 this.$.dialog.close();
77 }
78
79@@ -165,9 +174,11 @@ class SettingsSearchEngineDialogElement
80
81 private updateActionButtonState_() {
82 const allValid = [
83- this.$.searchEngine, this.$.keyword, this.$.queryUrl
84+ this.$.searchEngine, this.$.keyword, this.$.queryUrl,
85+ this.$.suggestionsUrl
86 ].every(function(inputElement) {
87- return !inputElement.invalid && inputElement.value.length > 0;
88+ return !inputElement.invalid && (inputElement.value.length > 0 ||
89+ inputElement.id == 'suggestionsUrl');
90 });
91 this.$.actionButton.disabled = !allValid;
92 }
93--- chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.ts.orig
94+++ chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.ts
95@@ -30,6 +30,7 @@ export type SearchEngine = {
96 modelIndex: number,
97 name: string,
98 url: string,
99+ suggestionsUrl: string,
100 urlLocked: boolean,
101 };
102
103@@ -53,7 +54,7 @@ export interface SearchEnginesBrowserPro
104 searchEngineEditCancelled(): void;
105
106 searchEngineEditCompleted(
107- searchEngine: string, keyword: string, queryUrl: string): void;
108+ searchEngine: string, keyword: string, queryUrl: string, suggestionsUrl: string): void;
109
110 getSearchEnginesList(): Promise<SearchEnginesInfo>;
111
112@@ -84,11 +85,12 @@ export class SearchEnginesBrowserProxyIm
113 }
114
115 searchEngineEditCompleted(
116- searchEngine: string, keyword: string, queryUrl: string) {
117+ searchEngine: string, keyword: string, queryUrl: string, suggestionsUrl: string) {
118 chrome.send('searchEngineEditCompleted', [
119 searchEngine,
120 keyword,
121 queryUrl,
122+ suggestionsUrl,
123 ]);
124 }
125
126--- chrome/browser/ui/search_engines/edit_search_engine_controller.cc.orig
127+++ chrome/browser/ui/search_engines/edit_search_engine_controller.cc
128@@ -67,6 +67,15 @@ bool EditSearchEngineController::IsURLVa
129 .is_valid();
130 }
131
132+bool EditSearchEngineController::IsSuggestionsURLValid(
133+ const std::string& suggestions_url_input) const {
134+ std::string suggestions_url = GetFixedUpURL(suggestions_url_input);
135+ if (suggestions_url.empty())
136+ return true;
137+
138+ return IsURLValid(suggestions_url);
139+}
140+
141 bool EditSearchEngineController::IsKeywordValid(
142 const std::u16string& keyword_input) const {
143 std::u16string keyword_input_trimmed(
144@@ -89,10 +98,12 @@ bool EditSearchEngineController::IsKeywo
145 void EditSearchEngineController::AcceptAddOrEdit(
146 const std::u16string& title_input,
147 const std::u16string& keyword_input,
148- const std::string& url_input) {
149+ const std::string& url_input,
150+ const std::string& suggestions_url_input) {
151 DCHECK(!keyword_input.empty());
152 std::string url_string = GetFixedUpURL(url_input);
153 DCHECK(!url_string.empty());
154+ std::string suggestions_url = GetFixedUpURL(suggestions_url_input);
155
156 TemplateURLService* template_url_service =
157 TemplateURLServiceFactory::GetForProfile(profile_);
158@@ -120,7 +131,8 @@ void EditSearchEngineController::AcceptA
159 } else {
160 // Adding or modifying an entry via the Delegate.
161 edit_keyword_delegate_->OnEditedKeyword(template_url_, title_input,
162- keyword_input, url_string);
163+ keyword_input, url_string,
164+ suggestions_url);
165 }
166 }
167
168--- chrome/browser/ui/search_engines/edit_search_engine_controller.h.orig
169+++ chrome/browser/ui/search_engines/edit_search_engine_controller.h
170@@ -23,7 +23,8 @@ class EditSearchEngineControllerDelegate
171 virtual void OnEditedKeyword(TemplateURL* template_url,
172 const std::u16string& title,
173 const std::u16string& keyword,
174- const std::string& url) = 0;
175+ const std::string& url,
176+ const std::string& suggestions_url) = 0;
177
178 protected:
179 virtual ~EditSearchEngineControllerDelegate() {}
180@@ -54,6 +55,8 @@ class EditSearchEngineController {
181 // character results in a valid url.
182 bool IsURLValid(const std::string& url_input) const;
183
184+ bool IsSuggestionsURLValid(const std::string& suggestions_url_input) const;
185+
186 // Returns true if the value of |keyword_input| represents a valid keyword.
187 // The keyword is valid if it is non-empty and does not conflict with an
188 // existing entry. NOTE: this is just the keyword, not the title and url.
189@@ -62,7 +65,8 @@ class EditSearchEngineController {
190 // Completes the add or edit of a search engine.
191 void AcceptAddOrEdit(const std::u16string& title_input,
192 const std::u16string& keyword_input,
193- const std::string& url_input);
194+ const std::string& url_input,
195+ const std::string& suggestions_url_input);
196
197 // Deletes an unused TemplateURL, if its add was cancelled and it's not
198 // already owned by the TemplateURLService.
199--- chrome/browser/ui/search_engines/keyword_editor_controller.cc.orig
200+++ chrome/browser/ui/search_engines/keyword_editor_controller.cc
201@@ -21,23 +21,27 @@ KeywordEditorController::KeywordEditorCo
202 KeywordEditorController::~KeywordEditorController() {
203 }
204
205-int KeywordEditorController::AddTemplateURL(const std::u16string& title,
206- const std::u16string& keyword,
207- const std::string& url) {
208+int KeywordEditorController::AddTemplateURL(
209+ const std::u16string& title,
210+ const std::u16string& keyword,
211+ const std::string& url,
212+ const std::string& suggestions_url) {
213 DCHECK(!url.empty());
214
215 base::RecordAction(UserMetricsAction("KeywordEditor_AddKeyword"));
216
217 const int new_index = table_model_->last_other_engine_index();
218- table_model_->Add(new_index, title, keyword, url);
219+ table_model_->Add(new_index, title, keyword, url, suggestions_url);
220
221 return new_index;
222 }
223
224-void KeywordEditorController::ModifyTemplateURL(TemplateURL* template_url,
225- const std::u16string& title,
226- const std::u16string& keyword,
227- const std::string& url) {
228+void KeywordEditorController::ModifyTemplateURL(
229+ TemplateURL* template_url,
230+ const std::u16string& title,
231+ const std::u16string& keyword,
232+ const std::string& url,
233+ const std::string& suggestions_url) {
234 DCHECK(!url.empty());
235 const int index = table_model_->IndexOfTemplateURL(template_url);
236 if (index == -1) {
237@@ -48,10 +52,12 @@ void KeywordEditorController::ModifyTemp
238
239 // Don't do anything if the entry didn't change.
240 if ((template_url->short_name() == title) &&
241- (template_url->keyword() == keyword) && (template_url->url() == url))
242+ (template_url->keyword() == keyword) &&
243+ (template_url->url() == url) &&
244+ (template_url->suggestions_url() == suggestions_url))
245 return;
246
247- table_model_->ModifyTemplateURL(index, title, keyword, url);
248+ table_model_->ModifyTemplateURL(index, title, keyword, url, suggestions_url);
249
250 base::RecordAction(UserMetricsAction("KeywordEditor_ModifiedKeyword"));
251 }
252--- chrome/browser/ui/search_engines/keyword_editor_controller.h.orig
253+++ chrome/browser/ui/search_engines/keyword_editor_controller.h
254@@ -29,14 +29,16 @@ class KeywordEditorController {
255 // model. Returns the index of the added URL.
256 int AddTemplateURL(const std::u16string& title,
257 const std::u16string& keyword,
258- const std::string& url);
259+ const std::string& url,
260+ const std::string& suggestions_url);
261
262 // Invoked when the user modifies a TemplateURL. Updates the
263 // TemplateURLService and table model appropriately.
264 void ModifyTemplateURL(TemplateURL* template_url,
265 const std::u16string& title,
266 const std::u16string& keyword,
267- const std::string& url);
268+ const std::string& url,
269+ const std::string& suggestions_url);
270
271 // Return true if the given |url| can be edited.
272 bool CanEdit(const TemplateURL* url) const;
273--- chrome/browser/ui/search_engines/template_url_table_model.cc.orig
274+++ chrome/browser/ui/search_engines/template_url_table_model.cc
275@@ -109,21 +109,25 @@ void TemplateURLTableModel::Remove(int i
276 void TemplateURLTableModel::Add(int index,
277 const std::u16string& short_name,
278 const std::u16string& keyword,
279- const std::string& url) {
280+ const std::string& url,
281+ const std::string& suggestions_url) {
282 DCHECK(index >= 0 && index <= RowCount());
283 DCHECK(!url.empty());
284 TemplateURLData data;
285 data.SetShortName(short_name);
286 data.SetKeyword(keyword);
287 data.SetURL(url);
288+ data.suggestions_url = suggestions_url;
289 data.is_active = TemplateURLData::ActiveStatus::kTrue;
290 template_url_service_->Add(std::make_unique<TemplateURL>(data));
291 }
292
293-void TemplateURLTableModel::ModifyTemplateURL(int index,
294- const std::u16string& title,
295- const std::u16string& keyword,
296- const std::string& url) {
297+void TemplateURLTableModel::ModifyTemplateURL(
298+ int index,
299+ const std::u16string& title,
300+ const std::u16string& keyword,
301+ const std::string& url,
302+ const std::string& suggestions_url) {
303 DCHECK(index >= 0 && index <= RowCount());
304 DCHECK(!url.empty());
305 TemplateURL* template_url = GetTemplateURL(index);
306@@ -132,7 +136,8 @@ void TemplateURLTableModel::ModifyTempla
307 DCHECK(template_url_service_->GetDefaultSearchProvider() != template_url ||
308 template_url->SupportsReplacement(
309 template_url_service_->search_terms_data()));
310- template_url_service_->ResetTemplateURL(template_url, title, keyword, url);
311+ template_url_service_->ResetTemplateURL(template_url, title, keyword, url,
312+ suggestions_url);
313 }
314
315 TemplateURL* TemplateURLTableModel::GetTemplateURL(int index) {
316--- chrome/browser/ui/search_engines/template_url_table_model.h.orig
317+++ chrome/browser/ui/search_engines/template_url_table_model.h
318@@ -54,13 +54,15 @@ class TemplateURLTableModel : public ui:
319 void Add(int index,
320 const std::u16string& short_name,
321 const std::u16string& keyword,
322- const std::string& url);
323+ const std::string& url,
324+ const std::string& suggestions_url);
325
326 // Update the entry at the specified index.
327 void ModifyTemplateURL(int index,
328 const std::u16string& title,
329 const std::u16string& keyword,
330- const std::string& url);
331+ const std::string& url,
332+ const std::string& suggestions_url);
333
334 // Reloads the icon at the specified index.
335 void ReloadIcon(int index);
336--- chrome/browser/ui/webui/settings/search_engines_handler.cc.orig
337+++ chrome/browser/ui/webui/settings/search_engines_handler.cc
338@@ -37,6 +37,7 @@ namespace {
339 const char kSearchEngineField[] = "searchEngine";
340 const char kKeywordField[] = "keyword";
341 const char kQueryUrlField[] = "queryUrl";
342+const char kSuggestionsUrlField[] = "suggestionsUrl";
343
344 // Dummy number used for indicating that a new search engine is added.
345 const int kNewSearchEngineIndex = -1;
346@@ -212,6 +213,9 @@ SearchEnginesHandler::CreateDictionaryFo
347 Profile* profile = Profile::FromWebUI(web_ui());
348 dict->SetString(
349 "url", template_url->url_ref().DisplayURL(UIThreadSearchTermsData()));
350+ dict->SetString("suggestionsUrl",
351+ template_url->suggestions_url_ref().DisplayURL(
352+ UIThreadSearchTermsData()));
353 dict->SetBoolean("urlLocked", template_url->prepopulate_id() > 0);
354 GURL icon_url = template_url->favicon_url();
355 if (icon_url.is_valid())
356@@ -325,12 +329,14 @@ void SearchEnginesHandler::HandleSearchE
357 void SearchEnginesHandler::OnEditedKeyword(TemplateURL* template_url,
358 const std::u16string& title,
359 const std::u16string& keyword,
360- const std::string& url) {
361+ const std::string& url,
362+ const std::string& suggestions_url) {
363 DCHECK(!url.empty());
364 if (template_url)
365- list_controller_.ModifyTemplateURL(template_url, title, keyword, url);
366+ list_controller_.ModifyTemplateURL(template_url, title, keyword, url,
367+ suggestions_url);
368 else
369- list_controller_.AddTemplateURL(title, keyword, url);
370+ list_controller_.AddTemplateURL(title, keyword, url, suggestions_url);
371
372 edit_controller_.reset();
373 }
374@@ -361,6 +367,8 @@ bool SearchEnginesHandler::CheckFieldVal
375 is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value));
376 else if (field_name.compare(kQueryUrlField) == 0)
377 is_valid = edit_controller_->IsURLValid(field_value);
378+ else if (field_name.compare(kSuggestionsUrlField) == 0)
379+ is_valid = edit_controller_->IsSuggestionsURLValid(field_value);
380 else
381 NOTREACHED();
382
383@@ -382,17 +390,21 @@ void SearchEnginesHandler::HandleSearchE
384 std::string search_engine;
385 std::string keyword;
386 std::string query_url;
387+ std::string suggestions_url;
388 CHECK(args->GetString(0, &search_engine));
389 CHECK(args->GetString(1, &keyword));
390 CHECK(args->GetString(2, &query_url));
391+ CHECK(args->GetString(3, &suggestions_url));
392
393 // Recheck validity. It's possible to get here with invalid input if e.g. the
394 // user calls the right JS functions directly from the web inspector.
395 if (CheckFieldValidity(kSearchEngineField, search_engine) &&
396 CheckFieldValidity(kKeywordField, keyword) &&
397- CheckFieldValidity(kQueryUrlField, query_url)) {
398+ CheckFieldValidity(kQueryUrlField, query_url) &&
399+ CheckFieldValidity(kSuggestionsUrlField, suggestions_url)) {
400 edit_controller_->AcceptAddOrEdit(base::UTF8ToUTF16(search_engine),
401- base::UTF8ToUTF16(keyword), query_url);
402+ base::UTF8ToUTF16(keyword),
403+ query_url, suggestions_url);
404 }
405 }
406
407--- chrome/browser/ui/webui/settings/search_engines_handler.h.orig
408+++ chrome/browser/ui/webui/settings/search_engines_handler.h
409@@ -50,7 +50,8 @@ class SearchEnginesHandler : public Sett
410 void OnEditedKeyword(TemplateURL* template_url,
411 const std::u16string& title,
412 const std::u16string& keyword,
413- const std::string& url) override;
414+ const std::string& url,
415+ const std::string& suggestions_url) override;
416
417 // SettingsPageUIHandler implementation.
418 void RegisterMessages() override;
419@@ -82,8 +83,8 @@ class SearchEnginesHandler : public Sett
420 // to WebUI. Called from WebUI.
421 void HandleValidateSearchEngineInput(const base::ListValue* args);
422
423- // Checks whether the given user input field (searchEngine, keyword, queryUrl)
424- // is populated with a valid value.
425+ // Checks whether the given user input field (searchEngine, keyword, queryUrl,
426+ // suggestionsUrl) is populated with a valid value.
427 bool CheckFieldValidity(const std::string& field_name,
428 const std::string& field_value);
429
430--- components/search_engines/template_url_service.cc.orig
431+++ components/search_engines/template_url_service.cc
432@@ -641,7 +641,8 @@ void TemplateURLService::IncrementUsageC
433 void TemplateURLService::ResetTemplateURL(TemplateURL* url,
434 const std::u16string& title,
435 const std::u16string& keyword,
436- const std::string& search_url) {
437+ const std::string& search_url,
438+ const std::string& suggestions_url) {
439 DCHECK(!IsCreatedByExtension(url));
440 DCHECK(!keyword.empty());
441 DCHECK(!search_url.empty());
442@@ -656,6 +657,7 @@ void TemplateURLService::ResetTemplateUR
443 data.safe_for_autoreplace = false;
444 data.last_modified = clock_->Now();
445 data.is_active = TemplateURLData::ActiveStatus::kTrue;
446+ data.suggestions_url = suggestions_url;
447
448 Update(url, TemplateURL(data));
449 }
450--- components/search_engines/template_url_service.h.orig
451+++ components/search_engines/template_url_service.h
452@@ -253,7 +253,8 @@ class TemplateURLService : public WebDat
453 void ResetTemplateURL(TemplateURL* url,
454 const std::u16string& title,
455 const std::u16string& keyword,
456- const std::string& search_url);
457+ const std::string& search_url,
458+ const std::string& suggestions_url);
459
460 // Sets the `is_active` field of the specified TemplateURL to `kTrue` or
461 // `kFalse`. Called when a user explicitly activates/deactivates the search
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch
deleted file mode 100644
index 4a78da1..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1--- chrome/browser/about_flags.cc.orig
2+++ chrome/browser/about_flags.cc
3@@ -2728,7 +2728,13 @@ const FeatureEntry::FeatureVariation kWi
4 // calculate and verify checksum.
5 //
6 // When adding a new choice, add it to the end of the list.
7+#include "chrome/browser/ungoogled_flag_choices.h"
8+#include "chrome/browser/bromite_flag_choices.h"
9+#include "chrome/browser/ungoogled_platform_flag_choices.h"
10 const FeatureEntry kFeatureEntries[] = {
11+#include "chrome/browser/ungoogled_flag_entries.h"
12+#include "chrome/browser/bromite_flag_entries.h"
13+#include "chrome/browser/ungoogled_platform_flag_entries.h"
14 // Include generated flags for flag unexpiry; see //docs/flag_expiry.md and
15 // //tools/flags/generate_unexpire_flags.py.
16 #include "build/chromeos_buildflags.h"
17--- /dev/null
18+++ chrome/browser/bromite_flag_choices.h
19@@ -0,0 +1,7 @@
20+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
21+// Use of this source code is governed by a BSD-style license that can be
22+// found in the LICENSE file.
23+
24+#ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
25+#define CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
26+#endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
27--- /dev/null
28+++ chrome/browser/bromite_flag_entries.h
29@@ -0,0 +1,7 @@
30+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
31+// Use of this source code is governed by a BSD-style license that can be
32+// found in the LICENSE file.
33+
34+#ifndef CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
35+#define CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
36+#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
37--- /dev/null
38+++ chrome/browser/ungoogled_flag_choices.h
39@@ -0,0 +1,7 @@
40+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
41+// Use of this source code is governed by a BSD-style license that can be
42+// found in the LICENSE file.
43+
44+#ifndef CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
45+#define CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
46+#endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
47--- /dev/null
48+++ chrome/browser/ungoogled_flag_entries.h
49@@ -0,0 +1,7 @@
50+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
51+// Use of this source code is governed by a BSD-style license that can be
52+// found in the LICENSE file.
53+
54+#ifndef CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
55+#define CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
56+#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
57--- /dev/null
58+++ chrome/browser/ungoogled_platform_flag_choices.h
59@@ -0,0 +1,7 @@
60+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
61+// Use of this source code is governed by a BSD-style license that can be
62+// found in the LICENSE file.
63+
64+#ifndef CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_
65+#define CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_
66+#endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_
67--- /dev/null
68+++ chrome/browser/ungoogled_platform_flag_entries.h
69@@ -0,0 +1,7 @@
70+// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
71+// Use of this source code is governed by a BSD-style license that can be
72+// found in the LICENSE file.
73+
74+#ifndef CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_
75+#define CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_
76+#endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch
deleted file mode 100644
index fab5b74..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1# Disables the dial registry's repeating discovery timer
2# This caused unnecessary SSDP network spam
3
4--- chrome/browser/media/router/discovery/dial/dial_registry.cc.orig
5+++ chrome/browser/media/router/discovery/dial/dial_registry.cc
6@@ -190,10 +190,6 @@ void DialRegistry::StartPeriodicDiscover
7
8 dial_ = CreateDialService();
9 dial_->AddObserver(this);
10- DoDiscovery();
11- repeating_timer_ = std::make_unique<base::RepeatingTimer>();
12- repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this,
13- &DialRegistry::DoDiscovery);
14 }
15
16 void DialRegistry::DoDiscovery() {
17@@ -207,8 +203,6 @@ void DialRegistry::StopPeriodicDiscovery
18 if (!dial_)
19 return;
20
21- repeating_timer_->Stop();
22- repeating_timer_.reset();
23 dial_->RemoveObserver(this);
24 ClearDialService();
25 }
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-download-quarantine.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-download-quarantine.patch
deleted file mode 100644
index 2191bbe..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-download-quarantine.patch
+++ /dev/null
@@ -1,296 +0,0 @@
1# Disables file download quarantining
2
3--- components/download/internal/common/base_file.cc.orig
4+++ components/download/internal/common/base_file.cc
5@@ -23,7 +23,6 @@
6 #include "components/download/public/common/download_interrupt_reasons_utils.h"
7 #include "components/download/public/common/download_item.h"
8 #include "components/download/public/common/download_stats.h"
9-#include "components/services/quarantine/quarantine.h"
10 #include "crypto/secure_hash.h"
11
12 #if defined(OS_WIN)
13@@ -535,105 +534,6 @@ DownloadInterruptReason BaseFile::Publis
14 }
15 #endif // defined(OS_ANDROID)
16
17-namespace {
18-
19-DownloadInterruptReason QuarantineFileResultToReason(
20- quarantine::mojom::QuarantineFileResult result) {
21- switch (result) {
22- case quarantine::mojom::QuarantineFileResult::OK:
23- return DOWNLOAD_INTERRUPT_REASON_NONE;
24- case quarantine::mojom::QuarantineFileResult::VIRUS_INFECTED:
25- return DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED;
26- case quarantine::mojom::QuarantineFileResult::SECURITY_CHECK_FAILED:
27- return DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED;
28- case quarantine::mojom::QuarantineFileResult::BLOCKED_BY_POLICY:
29- return DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED;
30- case quarantine::mojom::QuarantineFileResult::ACCESS_DENIED:
31- return DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED;
32-
33- case quarantine::mojom::QuarantineFileResult::FILE_MISSING:
34- // Don't have a good interrupt reason here. This return code means that
35- // the file at |full_path_| went missing before QuarantineFile got to
36- // look at it. Not expected to happen, but we've seen instances where a
37- // file goes missing immediately after BaseFile closes the handle.
38- //
39- // Intentionally using a different error message than
40- // SECURITY_CHECK_FAILED in order to distinguish the two.
41- return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
42-
43- case quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED:
44- // This means that the mark-of-the-web couldn't be applied. The file is
45- // already on the file system under its final target name.
46- //
47- // Causes of failed annotations typically aren't transient. E.g. the
48- // target file system may not support extended attributes or alternate
49- // streams. We are going to allow these downloads to progress on the
50- // assumption that failures to apply MOTW can't reliably be introduced
51- // remotely.
52- return DOWNLOAD_INTERRUPT_REASON_NONE;
53- }
54- return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
55-}
56-
57-// Given a source and a referrer, determines the "safest" URL that can be used
58-// to determine the authority of the download source. Returns an empty URL if no
59-// HTTP/S URL can be determined for the <|source_url|, |referrer_url|> pair.
60-GURL GetEffectiveAuthorityURL(const GURL& source_url,
61- const GURL& referrer_url) {
62- if (source_url.is_valid()) {
63- // http{,s} has an authority and are supported.
64- if (source_url.SchemeIsHTTPOrHTTPS())
65- return source_url;
66-
67- // If the download source is file:// ideally we should copy the MOTW from
68- // the original file, but given that Chrome/Chromium places strict
69- // restrictions on which schemes can reference file:// URLs, this code is
70- // going to assume that at this point it's okay to treat this download as
71- // being from the local system.
72- if (source_url.SchemeIsFile())
73- return source_url;
74-
75- // ftp:// has an authority.
76- if (source_url.SchemeIs(url::kFtpScheme))
77- return source_url;
78-
79- if (source_url.SchemeIs(url::kBlobScheme))
80- return url::Origin::Create(source_url).GetURL();
81- }
82-
83- if (referrer_url.is_valid() && referrer_url.SchemeIsHTTPOrHTTPS())
84- return referrer_url;
85-
86- return GURL();
87-}
88-
89-} // namespace
90-
91-void BaseFile::OnFileQuarantined(
92- bool connection_error,
93- quarantine::mojom::QuarantineFileResult result) {
94- base::UmaHistogramBoolean("Download.QuarantineService.ConnectionError",
95- connection_error);
96-
97- DCHECK(on_annotation_done_callback_);
98- quarantine_service_.reset();
99- std::move(on_annotation_done_callback_)
100- .Run(QuarantineFileResultToReason(result));
101-}
102-
103-void BaseFile::OnQuarantineServiceError(const GURL& source_url,
104- const GURL& referrer_url) {
105-#if defined(OS_WIN)
106- if (base::FeatureList::IsEnabled(quarantine::kOutOfProcessQuarantine)) {
107- OnFileQuarantined(/*connection_error=*/true,
108- quarantine::SetInternetZoneIdentifierDirectly(
109- full_path_, source_url, referrer_url));
110- return;
111- }
112-#endif // defined(OS_WIN)
113-
114- CHECK(false) << "In-process quarantine service should not have failed.";
115-}
116
117 void BaseFile::AnnotateWithSourceInformation(
118 const std::string& client_guid,
119@@ -641,32 +541,8 @@ void BaseFile::AnnotateWithSourceInforma
120 const GURL& referrer_url,
121 mojo::PendingRemote<quarantine::mojom::Quarantine> remote_quarantine,
122 OnAnnotationDoneCallback on_annotation_done_callback) {
123- GURL authority_url = GetEffectiveAuthorityURL(source_url, referrer_url);
124- if (!remote_quarantine) {
125-#if defined(OS_WIN)
126- quarantine::mojom::QuarantineFileResult result =
127- quarantine::SetInternetZoneIdentifierDirectly(full_path_, authority_url,
128- referrer_url);
129-#else
130- quarantine::mojom::QuarantineFileResult result =
131- quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED;
132-#endif
133- std::move(on_annotation_done_callback)
134- .Run(QuarantineFileResultToReason(result));
135- } else {
136- quarantine_service_.Bind(std::move(remote_quarantine));
137-
138- on_annotation_done_callback_ = std::move(on_annotation_done_callback);
139-
140- quarantine_service_.set_disconnect_handler(base::BindOnce(
141- &BaseFile::OnQuarantineServiceError, weak_factory_.GetWeakPtr(),
142- authority_url, referrer_url));
143-
144- quarantine_service_->QuarantineFile(
145- full_path_, authority_url, referrer_url, client_guid,
146- base::BindOnce(&BaseFile::OnFileQuarantined, weak_factory_.GetWeakPtr(),
147- false));
148- }
149+ std::move(on_annotation_done_callback)
150+ .Run(DOWNLOAD_INTERRUPT_REASON_NONE);
151 }
152
153 } // namespace download
154--- content/browser/BUILD.gn.orig
155+++ content/browser/BUILD.gn
156@@ -82,7 +82,6 @@ source_set("browser") {
157 "//components/permissions:permissions_common",
158 "//components/power_scheduler",
159 "//components/services/filesystem:lib",
160- "//components/services/quarantine:quarantine",
161 "//components/services/storage",
162 "//components/services/storage:filesystem_proxy_factory",
163 "//components/services/storage/dom_storage:local_storage_proto",
164--- content/browser/file_system_access/safe_move_helper.cc.orig
165+++ content/browser/file_system_access/safe_move_helper.cc
166@@ -12,7 +12,6 @@
167 #include "base/task/thread_pool.h"
168 #include "base/threading/sequenced_task_runner_handle.h"
169 #include "build/build_config.h"
170-#include "components/services/quarantine/quarantine.h"
171 #include "content/browser/file_system_access/file_system_access_error.h"
172 #include "content/public/browser/content_browser_client.h"
173 #include "content/public/common/content_client.h"
174@@ -193,20 +192,8 @@ void SafeMoveHelper::DidAfterWriteCheck(
175 // not exist anymore. In case of error, the source file URL will point to a
176 // valid filesystem location.
177 base::OnceCallback<void(base::File::Error)> result_callback;
178- if (RequireSecurityChecks()) {
179- GURL referrer_url = manager_->is_off_the_record() ? GURL() : context_.url;
180- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote;
181- if (quarantine_connection_callback_) {
182- quarantine_connection_callback_.Run(
183- quarantine_remote.BindNewPipeAndPassReceiver());
184- }
185- result_callback = base::BindOnce(
186- &SafeMoveHelper::DidFileDoQuarantine, weak_factory_.GetWeakPtr(),
187- dest_url(), referrer_url, std::move(quarantine_remote));
188- } else {
189 result_callback = base::BindOnce(&SafeMoveHelper::DidFileSkipQuarantine,
190 weak_factory_.GetWeakPtr());
191- }
192 manager_->DoFileSystemOperation(
193 FROM_HERE, &storage::FileSystemOperationRunner::MoveFileLocal,
194 std::move(result_callback), source_url(), dest_url(), option_);
195@@ -220,7 +207,6 @@ void SafeMoveHelper::DidFileSkipQuaranti
196 void SafeMoveHelper::DidFileDoQuarantine(
197 const storage::FileSystemURL& target_url,
198 const GURL& referrer_url,
199- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
200 base::File::Error result) {
201 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
202
203@@ -251,37 +237,9 @@ void SafeMoveHelper::DidFileDoQuarantine
204 referrer_url.is_valid() && referrer_url.SchemeIsHTTPOrHTTPS()
205 ? referrer_url
206 : GURL();
207-
208- if (quarantine_remote) {
209- quarantine::mojom::Quarantine* raw_quarantine = quarantine_remote.get();
210- raw_quarantine->QuarantineFile(
211- target_url.path(), authority_url, referrer_url,
212- GetContentClient()
213- ->browser()
214- ->GetApplicationClientGUIDForQuarantineCheck(),
215- mojo::WrapCallbackWithDefaultInvokeIfNotRun(
216- base::BindOnce(&SafeMoveHelper::DidAnnotateFile,
217- weak_factory_.GetWeakPtr(),
218- std::move(quarantine_remote)),
219- quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED));
220- } else {
221-#if defined(OS_WIN)
222- base::ThreadPool::PostTaskAndReplyWithResult(
223- FROM_HERE, {base::MayBlock()},
224- base::BindOnce(&quarantine::SetInternetZoneIdentifierDirectly,
225- target_url.path(), authority_url, referrer_url),
226- base::BindOnce(&SafeMoveHelper::DidAnnotateFile,
227- weak_factory_.GetWeakPtr(),
228- std::move(quarantine_remote)));
229-#else
230- DidAnnotateFile(std::move(quarantine_remote),
231- quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED);
232-#endif
233- }
234 }
235
236 void SafeMoveHelper::DidAnnotateFile(
237- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
238 quarantine::mojom::QuarantineFileResult result) {
239 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
240
241--- content/browser/file_system_access/safe_move_helper.h.orig
242+++ content/browser/file_system_access/safe_move_helper.h
243@@ -58,10 +58,8 @@ class CONTENT_EXPORT SafeMoveHelper {
244 void DidFileDoQuarantine(
245 const storage::FileSystemURL& target_url,
246 const GURL& referrer_url,
247- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
248 base::File::Error result);
249 void DidAnnotateFile(
250- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
251 quarantine::mojom::QuarantineFileResult result);
252
253 void ComputeHashForSourceFile(HashCallback callback);
254--- content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig
255+++ content/browser/renderer_host/pepper/pepper_file_io_host.cc
256@@ -456,7 +456,7 @@ void PepperFileIOHost::OnLocalFileOpened
257 ppapi::host::ReplyMessageContext reply_context,
258 const base::FilePath& path,
259 base::File::Error error_code) {
260-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
261+#if 0
262 // Quarantining a file before its contents are available is only supported on
263 // Windows and Linux.
264 if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) {
265@@ -490,7 +490,7 @@ void PepperFileIOHost::OnLocalFileOpened
266 #endif
267 }
268
269-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
270+#if 0
271 void PepperFileIOHost::OnLocalFileQuarantined(
272 ppapi::host::ReplyMessageContext reply_context,
273 const base::FilePath& path,
274--- content/browser/renderer_host/pepper/pepper_file_io_host.h.orig
275+++ content/browser/renderer_host/pepper/pepper_file_io_host.h
276@@ -13,7 +13,6 @@
277 #include "base/macros.h"
278 #include "base/memory/ref_counted.h"
279 #include "base/memory/weak_ptr.h"
280-#include "components/services/quarantine/public/mojom/quarantine.mojom.h"
281 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
282 #include "ipc/ipc_listener.h"
283 #include "ipc/ipc_platform_file.h"
284@@ -93,12 +92,6 @@ class PepperFileIOHost : public ppapi::h
285 const base::FilePath& path,
286 base::File::Error error_code);
287
288- void OnLocalFileQuarantined(
289- ppapi::host::ReplyMessageContext reply_context,
290- const base::FilePath& path,
291- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
292- quarantine::mojom::QuarantineFileResult quarantine_result);
293-
294 void SendFileOpenReply(ppapi::host::ReplyMessageContext reply_context,
295 base::File::Error error_code);
296
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch
deleted file mode 100644
index f9f6449..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1# Disables omission of URL elements in Omnibox
2
3--- components/url_formatter/url_formatter.cc.orig
4+++ components/url_formatter/url_formatter.cc
5@@ -463,14 +463,14 @@ ComponentResult IDNToUnicodeOneComponent
6 } // namespace
7
8 const FormatUrlType kFormatUrlOmitNothing = 0;
9-const FormatUrlType kFormatUrlOmitUsernamePassword = 1 << 0;
10-const FormatUrlType kFormatUrlOmitHTTP = 1 << 1;
11-const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 1 << 2;
12-const FormatUrlType kFormatUrlOmitHTTPS = 1 << 3;
13-const FormatUrlType kFormatUrlOmitTrivialSubdomains = 1 << 5;
14-const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6;
15-const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7;
16-const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
17+const FormatUrlType kFormatUrlOmitUsernamePassword = 0 << 0;
18+const FormatUrlType kFormatUrlOmitHTTP = 0 << 1;
19+const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 0 << 2;
20+const FormatUrlType kFormatUrlOmitHTTPS = 0 << 3;
21+const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5;
22+const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6;
23+const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7;
24+const FormatUrlType kFormatUrlOmitMailToScheme = 0 << 8;
25
26 const FormatUrlType kFormatUrlOmitDefaults =
27 kFormatUrlOmitUsernamePassword | kFormatUrlOmitHTTP |
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch
deleted file mode 100644
index f264b5d..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1# Disables the intranet redirect detector. It generates extra DNS requests and the functionality using this is disabled
2# See this page for more information: https://mikewest.org/2012/02/chrome-connects-to-three-random-domains-at-startup
3
4--- chrome/browser/intranet_redirect_detector.cc.orig
5+++ chrome/browser/intranet_redirect_detector.cc
6@@ -119,9 +119,7 @@ void IntranetRedirectDetector::FinishSle
7 simple_loaders_.clear();
8 resulting_origins_.clear();
9
10- const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
11- if (cmd_line->HasSwitch(switches::kDisableBackgroundNetworking))
12- return;
13+ return;
14
15 DCHECK(simple_loaders_.empty() && resulting_origins_.empty());
16
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch
deleted file mode 100644
index 2896a43..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1# Return blank values for WebGLDebugRendererInfo to remove a potential data
2# leak while preventing potential website breakage
3
4--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig
5+++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
6@@ -3595,8 +3595,7 @@ ScriptValue WebGLRenderingContextBase::g
7 pname, IdentifiabilityBenignStringToken(
8 String(ContextGL()->GetString(GL_RENDERER))));
9 }
10- return WebGLAny(script_state,
11- String(ContextGL()->GetString(GL_RENDERER)));
12+ return WebGLAny(script_state, String(""));
13 }
14 SynthesizeGLError(
15 GL_INVALID_ENUM, "getParameter",
16@@ -3610,8 +3609,7 @@ ScriptValue WebGLRenderingContextBase::g
17 pname, IdentifiabilityBenignStringToken(
18 String(ContextGL()->GetString(GL_VENDOR))));
19 }
20- return WebGLAny(script_state,
21- String(ContextGL()->GetString(GL_VENDOR)));
22+ return WebGLAny(script_state, String(""));
23 }
24 SynthesizeGLError(
25 GL_INVALID_ENUM, "getParameter",
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch
deleted file mode 100644
index 4ea4498..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1# Enable chrome://flags/#prefetch-privacy-changes by default
2
3--- third_party/blink/common/features.cc.orig
4+++ third_party/blink/common/features.cc
5@@ -416,7 +416,7 @@ const base::Feature kComputePressure{"Co
6 // Prefetch request properties are updated to be privacy-preserving. See
7 // crbug.com/988956.
8 const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
9- base::FEATURE_DISABLED_BY_DEFAULT};
10+ base::FEATURE_ENABLED_BY_DEFAULT};
11
12 // Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this
13 // format in the image decode cache. See crbug.com/919627 for details on the
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch
deleted file mode 100644
index 5f87fc2..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1# Add ability to always open dev context menu on reload button.
2
3--- chrome/browser/ui/views/toolbar/reload_button.cc.orig
4+++ chrome/browser/ui/views/toolbar/reload_button.cc
5@@ -84,7 +84,7 @@ bool ReloadButton::GetMenuEnabled() cons
6 }
7
8 void ReloadButton::SetMenuEnabled(bool enable) {
9- menu_enabled_ = enable;
10+ menu_enabled_ = true;
11 }
12
13 void ReloadButton::OnMouseExited(const ui::MouseEvent& event) {
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch
deleted file mode 100644
index a983beb..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1# Add more URL schemes allowed for saving
2
3--- chrome/browser/ui/browser_commands.cc.orig
4+++ chrome/browser/ui/browser_commands.cc
5@@ -440,11 +440,6 @@ int GetContentRestrictions(const Browser
6 CoreTabHelper* core_tab_helper =
7 CoreTabHelper::FromWebContents(current_tab);
8 content_restrictions = core_tab_helper->content_restrictions();
9- NavigationEntry* last_committed_entry =
10- current_tab->GetController().GetLastCommittedEntry();
11- if (!content::IsSavableURL(
12- last_committed_entry ? last_committed_entry->GetURL() : GURL()))
13- content_restrictions |= CONTENT_RESTRICTION_SAVE;
14 }
15 return content_restrictions;
16 }
17@@ -1342,8 +1337,7 @@ bool CanSavePage(const Browser* browser)
18 prefs::kAllowFileSelectionDialogs)) {
19 return false;
20 }
21- return !browser->is_type_devtools() &&
22- !(GetContentRestrictions(browser) & CONTENT_RESTRICTION_SAVE);
23+ return true;
24 }
25
26 void Print(Browser* browser) {
27--- components/offline_pages/core/offline_page_model.cc.orig
28+++ components/offline_pages/core/offline_page_model.cc
29@@ -22,7 +22,7 @@ OfflinePageModel::SavePageParams::~SaveP
30
31 // static
32 bool OfflinePageModel::CanSaveURL(const GURL& url) {
33- return url.is_valid() && url.SchemeIsHTTPOrHTTPS();
34+ return url.is_valid();
35 }
36
37 OfflinePageModel::OfflinePageModel() = default;
38--- content/common/url_schemes.cc.orig
39+++ content/common/url_schemes.cc
40@@ -23,6 +23,9 @@ namespace {
41 bool g_registered_url_schemes = false;
42
43 const char* const kDefaultSavableSchemes[] = {
44+ url::kAboutScheme,
45+ url::kBlobScheme,
46+ url::kContentScheme,
47 url::kHttpScheme,
48 url::kHttpsScheme,
49 url::kFileScheme,
50@@ -30,7 +33,13 @@ const char* const kDefaultSavableSchemes
51 url::kFtpScheme,
52 kChromeDevToolsScheme,
53 kChromeUIScheme,
54- url::kDataScheme
55+ url::kDataScheme,
56+ url::kJavaScriptScheme,
57+ url::kMailToScheme,
58+ url::kWsScheme,
59+ url::kWssScheme,
60+ kGuestScheme,
61+ kViewSourceScheme
62 };
63
64 // These lists are lazily initialized below and are leaked on shutdown to
65--- content/public/common/url_utils.cc.orig
66+++ content/public/common/url_utils.cc
67@@ -26,11 +26,7 @@ bool HasWebUIScheme(const GURL& url) {
68 }
69
70 bool IsSavableURL(const GURL& url) {
71- for (auto& scheme : GetSavableSchemes()) {
72- if (url.SchemeIs(scheme))
73- return true;
74- }
75- return false;
76+ return true;
77 }
78
79 bool IsURLHandledByNetworkStack(const GURL& url) {
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch
deleted file mode 100644
index 6205679..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1--- chrome/browser/ui/views/tabs/new_tab_button.cc.orig
2+++ chrome/browser/ui/views/tabs/new_tab_button.cc
3@@ -58,10 +58,8 @@ NewTabButton::NewTabButton(TabStrip* tab
4 SetAnimateOnStateChange(true);
5 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
6 // of lacros-chrome is complete.
7-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
8 SetTriggerableEventFlags(GetTriggerableEventFlags() |
9 ui::EF_MIDDLE_MOUSE_BUTTON);
10-#endif
11
12 ink_drop_container_ =
13 AddChildView(std::make_unique<views::InkDropContainerView>());
14--- chrome/browser/ui/views/tabs/tab_strip.cc.orig
15+++ chrome/browser/ui/views/tabs/tab_strip.cc
16@@ -2680,8 +2680,6 @@ void TabStrip::NewTabButtonPressed(const
17
18 const ui::MouseEvent& mouse = static_cast<const ui::MouseEvent&>(event);
19 if (mouse.IsOnlyMiddleMouseButton()) {
20- if (ui::Clipboard::IsSupportedClipboardBuffer(
21- ui::ClipboardBuffer::kSelection)) {
22 ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
23 CHECK(clipboard);
24 std::u16string clipboard_text;
25@@ -2689,7 +2687,6 @@ void TabStrip::NewTabButtonPressed(const
26 /* data_dst = */ nullptr, &clipboard_text);
27 if (!clipboard_text.empty())
28 controller_->CreateNewTabWithLocation(clipboard_text);
29- }
30 return;
31 }
32 }
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch
deleted file mode 100644
index 6fb35ec..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1# Fix building with enable_service_discovery=false and enable_mds=false
2
3--- chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc.orig
4+++ chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc
5@@ -40,37 +40,22 @@ DnsSdDeviceLister::DnsSdDeviceLister(
6 DnsSdDeviceLister::~DnsSdDeviceLister() {}
7
8 void DnsSdDeviceLister::Discover() {
9-#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
10- if (!device_lister_) {
11- device_lister_ = local_discovery::ServiceDiscoveryDeviceLister::Create(
12- this, service_discovery_client_, service_type_);
13- device_lister_->Start();
14- }
15- device_lister_->DiscoverNewDevices();
16-#endif
17 }
18
19 void DnsSdDeviceLister::Reset() {
20- device_lister_.reset();
21 }
22
23 void DnsSdDeviceLister::OnDeviceChanged(
24 const std::string& service_type,
25 bool added,
26 const ServiceDescription& service_description) {
27- DnsSdService service;
28- FillServiceInfo(service_description, &service);
29- delegate_->ServiceChanged(device_lister_->service_type(), added, service);
30 }
31
32 void DnsSdDeviceLister::OnDeviceRemoved(const std::string& service_type,
33 const std::string& service_name) {
34- delegate_->ServiceRemoved(service_type, service_name);
35 }
36
37 void DnsSdDeviceLister::OnDeviceCacheFlushed(const std::string& service_type) {
38- delegate_->ServicesFlushed(device_lister_->service_type());
39- device_lister_->DiscoverNewDevices();
40 }
41
42 } // namespace media_router
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/fix-distilled-icons.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/fix-distilled-icons.patch
deleted file mode 100644
index 80a9618..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/fix-distilled-icons.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1--- components/dom_distiller/core/css/distilledpage.css.orig
2+++ components/dom_distiller/core/css/distilledpage.css
3@@ -28,6 +28,11 @@
4 box-sizing: border-box;
5 }
6
7+.material-icons {
8+ font-family: Material Icons;
9+ font-style: normal !important;
10+}
11+
12 /* Remove all margins and padding from certain element and add word wrap. */
13
14 blockquote,
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/keep-expired-flags.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/keep-expired-flags.patch
deleted file mode 100644
index 9f9df17..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/keep-expired-flags.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1--- components/flags_ui/flags_state.cc.orig
2+++ components/flags_ui/flags_state.cc
3@@ -22,6 +22,7 @@
4 #include "base/values.h"
5 #include "build/build_config.h"
6 #include "build/chromeos_buildflags.h"
7+#include "chrome/browser/unexpire_flags.h"
8 #include "components/flags_ui/feature_entry.h"
9 #include "components/flags_ui/flags_storage.h"
10 #include "components/flags_ui/flags_ui_switches.h"
11@@ -577,14 +578,18 @@ void FlagsState::GetFlagFeatureEntries(
12 int current_platform = GetCurrentPlatform();
13
14 for (const FeatureEntry& entry : feature_entries_) {
15+ std::string desc = entry.visible_description;
16 if (skip_feature_entry.Run(entry))
17+ if (flags::IsFlagExpired(flags_storage, entry.internal_name))
18+ desc.insert(0, "!!! NOTE: THIS FLAG IS EXPIRED AND MAY STOP FUNCTIONING OR BE REMOVED SOON !!! ");
19+ else
20 continue;
21
22 base::Value data(base::Value::Type::DICTIONARY);
23 data.SetStringKey("internal_name", entry.internal_name);
24 data.SetStringKey("name", base::StringPiece(entry.visible_name));
25 data.SetStringKey("description",
26- base::StringPiece(entry.visible_description));
27+ base::StringPiece(desc));
28
29 base::Value supported_platforms(base::Value::Type::LIST);
30 AddOsStrings(entry.supported_platforms, &supported_platforms);
31@@ -901,6 +906,7 @@ bool FlagsState::IsSupportedFeature(cons
32 if (!entry.InternalNameMatches(name))
33 continue;
34 if (delegate_ && delegate_->ShouldExcludeFlag(storage, entry))
35+ if (!flags::IsFlagExpired(storage, entry.internal_name))
36 continue;
37 return true;
38 }
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch
deleted file mode 100644
index 58e1587..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1## template_url_prepopulate_data.cc
2# Appends search engines to the returned list of prepopulated search engines.
3# Only add DDG if it hasn't already been included.
4#
5## util.cc
6# Only snyc the prepoulated search engines when initializing the database.
7# Prevents search engines from being overridden in future updates.
8#
9--- components/search_engines/template_url_prepopulate_data.cc.orig
10+++ components/search_engines/template_url_prepopulate_data.cc
11@@ -1325,6 +1325,9 @@ std::vector<std::unique_ptr<TemplateURLD
12 std::vector<std::unique_ptr<TemplateURLData>> t_urls;
13 for (size_t i = 0; i < num_engines; ++i)
14 t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(*engines[i]));
15+ if (std::find(engines, engines + num_engines, &duckduckgo) == engines + num_engines) {
16+ t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(duckduckgo));
17+ }
18 return t_urls;
19 }
20
21--- components/search_engines/util.cc.orig
22+++ components/search_engines/util.cc
23@@ -396,7 +396,7 @@ void GetSearchProvidersUsingLoadedEngine
24
25 const int prepopulate_resource_keyword_version =
26 TemplateURLPrepopulateData::GetDataVersion(prefs);
27- if (*resource_keyword_version < prepopulate_resource_keyword_version) {
28+ if (*resource_keyword_version == 0) {
29 MergeEnginesFromPrepopulateData(service, &prepopulated_urls, template_urls,
30 default_search_provider,
31 removed_keyword_guids);
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch
deleted file mode 100644
index 55ddd53..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1# Remove the "--disable-setuid-sandbox" command line flag as a bad flag
2
3--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig
4+++ chrome/browser/ui/startup/bad_flags_prompt.cc
5@@ -61,7 +61,6 @@ static const char* kBadFlags[] = {
6 // These flags disable sandbox-related security.
7 sandbox::policy::switches::kDisableGpuSandbox,
8 sandbox::policy::switches::kDisableSeccompFilterSandbox,
9- sandbox::policy::switches::kDisableSetuidSandbox,
10 sandbox::policy::switches::kNoSandbox,
11 #if defined(OS_WIN)
12 sandbox::policy::switches::kAllowThirdPartyModules,
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/remove-uneeded-ui.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/remove-uneeded-ui.patch
deleted file mode 100644
index cbb86fd..0000000
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/remove-uneeded-ui.patch
+++ /dev/null
@@ -1,282 +0,0 @@
1# Removes in order:
2# link to Chrome store on the extensions page when empty
3# link to Chrome store in extensions page sidebar
4# 'Tabs from other devices' entry on the History page sidebar
5# the 'Learn more' link on new incognito tabs
6# Live captions entry from the settings page
7# link to Google's accessibility site from the settings page
8# link to Google's help site on the About page
9# external link for theme entry on settings page
10# Check passwords and managed passwords sections from the passwords page
11# the Google account line from the Payment methods page
12# Safety check section on the settings page
13# Google sign-in and Anonymized Data Collection sections
14# Advanced Protection Program link on the security settings page
15# the 'Learn more' link from the search engine entry on the settings page
16# Safety Check entry on the side menu on the settings page
17# the (?) learn more button on many settings pages
18# unneeded elements from the profile menu
19# the 'Learn more' link on crashed tabs
20
21--- chrome/browser/resources/extensions/item_list.html.orig
22+++ chrome/browser/resources/extensions/item_list.html
23@@ -80,13 +80,6 @@
24 <div id="container">
25 <managed-footnote hidden="[[filter]]"></managed-footnote>
26 <div id="content-wrapper" style="--max-columns: [[maxColumns_]];">
27- <div id="no-items" class="empty-list-message"
28- hidden$="[[!shouldShowEmptyItemsMessage_(
29- apps.length, extensions.length)]]">
30- <span on-click="onNoExtensionsTap_">
31- $i18nRaw{noExtensionsOrApps}
32- </span>
33- </div>
34 <div id="no-search-results" class="empty-list-message"
35 hidden$="[[!shouldShowEmptySearchMessage_(
36 shownAppsCount_, shownExtensionsCount_, apps, extensions)]]">
37--- chrome/browser/resources/extensions/sidebar.html.orig
38+++ chrome/browser/resources/extensions/sidebar.html
39@@ -69,12 +69,3 @@
40 <paper-ripple></paper-ripple>
41 </a>
42 </iron-selector>
43-<div>
44- <div class="separator"></div>
45- <a class="section-item" id="more-extensions" target="_blank"
46- href="$i18n{getMoreExtensionsUrl}" on-click="onMoreExtensionsTap_">
47- <span>$i18n{openChromeWebStore}</span>
48- <div class="cr-icon icon-external"></div>
49- <paper-ripple></paper-ripple>
50- </a>
51-</div>
52--- chrome/browser/resources/history/side_bar.html.orig
53+++ chrome/browser/resources/history/side_bar.html
54@@ -128,13 +128,6 @@
55 $i18n{historyMenuItem}
56 <paper-ripple></paper-ripple>
57 </a>
58- <a id="syncedTabs" role="menuitem" href="/syncedTabs"
59- class="page-item cr-nav-menu-item"
60- path="syncedTabs" on-click="onItemClick_">
61- <iron-icon icon="cr:phonelink"></iron-icon>
62- $i18n{openTabsMenuItem}
63- <paper-ripple></paper-ripple>
64- </a>
65 <div class="separator"></div>
66 <a role="menuitem" id="clear-browsing-data"
67 class="cr-nav-menu-item"
68--- chrome/browser/resources/ntp4/incognito_tab.html.orig
69+++ chrome/browser/resources/ntp4/incognito_tab.html
70@@ -24,8 +24,6 @@ document.querySelector('#incognitothemec
71 <h1>$i18n{incognitoTabHeading}</h1>
72 <p id="subtitle">
73 <span>$i18n{incognitoTabDescription}</span>
74- <a class="learn-more-button"
75- href="$i18n{learnMoreLink}">$i18n{learnMore}</a>
76 </p>
77 <div id="bulletpoints-wrapper">
78 <div class="bulletpoints first">$i18nRaw{incognitoTabFeatures}</div>
79--- chrome/browser/resources/settings/a11y_page/a11y_page.html.orig
80+++ chrome/browser/resources/settings/a11y_page/a11y_page.html
81@@ -21,7 +21,7 @@
82 external$="[[captionSettingsOpensExternally_]]">
83 </cr-link-row>
84 </template>
85- <template is="dom-if" if="[[!captionSettingsOpensExternally_]]">
86+ <template is="dom-if" if="[[false]]">
87 <cr-link-row id="captions"
88 label="$i18n{captionsTitle}"
89 on-click="onCaptionsClick_"
90@@ -51,10 +51,6 @@
91 sub-label="$i18n{accessibleImageLabelsSubtitle}">
92 </settings-toggle-button>
93 </if>
94- <cr-link-row class="hr" label="$i18n{moreFeaturesLink}"
95- on-click="onMoreFeaturesLinkClick_" sub-label="$i18n{a11yWebStore}"
96- external>
97- </cr-link-row>
98 </div>
99 <if expr="not chromeos">
100 <template is="dom-if" if="[[!captionSettingsOpensExternally_]]">
101--- chrome/browser/resources/settings/about_page/about_page.html.orig
102+++ chrome/browser/resources/settings/about_page/about_page.html
103@@ -131,8 +131,6 @@
104 </div>
105 </template>
106 </if>
107- <cr-link-row class="hr" id="help" on-click="onHelpTap_"
108- label="$i18n{aboutGetHelpUsingChrome}" external></cr-link-row>
109 <if expr="_google_chrome">
110 <cr-link-row class="hr" id="reportIssue" on-click="onReportIssueTap_"
111 hidden="[[!prefs.feedback_allowed.value]]"
112--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig
113+++ chrome/browser/resources/settings/appearance_page/appearance_page.html
114@@ -22,11 +22,11 @@
115 <settings-animated-pages id="pages" section="appearance"
116 focus-config="[[focusConfig_]]">
117 <div route-path="default">
118- <div class="settings-row first" id="themeRow"
119+ <div class="cr-row first" id="themeRow"
120 hidden="[[!pageVisibility.setTheme]]">
121- <cr-link-row class="first" hidden="[[!pageVisibility.setTheme]]"
122- label="$i18n{themes}" sub-label="[[themeSublabel_]]"
123- on-click="openThemeUrl_" external></cr-link-row>
124+ <div class="flex cr-padded-text">
125+ <div>$i18n{themes}</div><div class="secondary">[[themeSublabel_]]</div>
126+ </div>
127 <if expr="not is_posix or chromeos or lacros">
128 <template is="dom-if" if="[[prefs.extensions.theme.id.value]]">
129 <div class="separator"></div>
130--- chrome/browser/resources/settings/autofill_page/passwords_section.html.orig
131+++ chrome/browser/resources/settings/autofill_page/passwords_section.html
132@@ -107,6 +107,7 @@
133 label="$i18n{trustedVaultOptInLabel}"
134 sub-label="$i18n{trustedVaultOptInSubLabel}">
135 </cr-link-row>
136+<if expr="false">
137 <div id="checkPasswordsBannerContainer" class="cr-row"
138 hidden$="[[!shouldShowBanner_]]">
139 <picture>
140@@ -155,6 +156,7 @@
141 <!-- This div lays out the link correctly, relative to the text. -->
142 <div class="cr-padded-text">$i18nRaw{managePasswordsLabel}</div>
143 </div>
144+</if>
145 <div class="cr-row first">
146 <h2 id="savedPasswordsHeading" class="flex">
147 $i18n{savedPasswordsHeading}
148--- chrome/browser/resources/settings/autofill_page/payments_section.html.orig
149+++ chrome/browser/resources/settings/autofill_page/payments_section.html
150@@ -53,11 +53,6 @@
151 </div>
152 </template>
153
154- <div id="manageLink" class="cr-row first">
155- <!-- This span lays out the link correctly, relative to the text. -->
156- <div class="cr-padded-text">$i18nRaw{manageCreditCardsLabel}</div>
157- </div>
158-
159 <div class="cr-row continuation">
160 <h2 class="flex">$i18n{creditCards}</h2>
161 <cr-button id="addCreditCard" class="header-aligned-button"
162--- chrome/browser/resources/settings/basic_page/basic_page.html.orig
163+++ chrome/browser/resources/settings/basic_page/basic_page.html
164@@ -102,7 +102,7 @@
165 <settings-privacy-review-promo></settings-privacy-review-promo>
166 </settings-section>
167 </template>
168- <template is="dom-if" if="[[showPage_(pageVisibility.safetyCheck)]]"
169+ <template is="dom-if" if="[[false]]"
170 restamp>
171 <settings-section page-title="$i18n{safetyCheckSectionTitle}"
172 section="safetyCheck" nest-under-section="privacy"
173--- chrome/browser/resources/settings/privacy_page/personalization_options.html.orig
174+++ chrome/browser/resources/settings/privacy_page/personalization_options.html
175@@ -8,7 +8,7 @@
176 border-top: none;
177 }
178 </style>
179-<if expr="not chromeos">
180+<if expr="false">
181 <settings-toggle-button id="signinAllowedToggle"
182 class="hr"
183 hidden="[[!signinAvailable_]]"
184@@ -51,12 +51,6 @@
185 </settings-toggle-button>
186 </if><!-- not chromeos -->
187 </if><!-- _google_chrome -->
188- <settings-toggle-button id="urlCollectionToggle"
189- class="hr"
190- pref="{{prefs.url_keyed_anonymized_data_collection.enabled}}"
191- label="$i18n{urlKeyedAnonymizedDataCollection}"
192- sub-label="$i18n{urlKeyedAnonymizedDataCollectionDesc}">
193- </settings-toggle-button>
194 <if expr="_google_chrome">
195 <settings-toggle-button id="spellCheckControl"
196 class="hr"
197--- chrome/browser/resources/settings/privacy_page/security_page.html.orig
198+++ chrome/browser/resources/settings/privacy_page/security_page.html
199@@ -96,10 +96,3 @@
200 sub-label="$i18n{manageCertificatesDescription}"
201 on-click="onManageCertificatesClick_"></cr-link-row>
202 </if>
203- <cr-link-row id="advanced-protection-program-link"
204- class="hr"
205- label="$i18n{advancedProtectionProgramTitle}"
206- sub-label="$i18n{advancedProtectionProgramDesc}"
207- on-click="onAdvancedProtectionProgramLinkClick_"
208- external>
209- </cr-link-row>
210--- chrome/browser/resources/settings/search_page/search_page.html.orig
211+++ chrome/browser/resources/settings/search_page/search_page.html
212@@ -12,10 +12,6 @@
213 <div class="cr-row first">
214 <div id="searchExplanation" class="flex cr-padded-text">
215 $i18n{searchExplanation}
216- <a href="$i18n{searchExplanationLearnMoreURL}"
217- target="_blank">
218- $i18n{learnMore}
219- </a>
220 </div>
221 <template is="dom-if" if="[[isDefaultSearchControlledByPolicy_(
222 prefs.default_search_provider_data.template_url_data)]]">
223--- chrome/browser/resources/settings/settings_menu/settings_menu.html.orig
224+++ chrome/browser/resources/settings/settings_menu/settings_menu.html
225@@ -111,7 +111,7 @@
226 $i18n{autofillPageTitle}
227 <paper-ripple></paper-ripple>
228 </a>
229- <template is="dom-if" if="[[!enableLandingPageRedesign_]]">
230+ <template is="dom-if" if="[[false]]">
231 <a role="menuitem" href="/safetyCheck"
232 hidden="[[!pageVisibility.safetyCheck]]"
233 id="safetyCheck"
234--- chrome/browser/resources/settings/settings_page/settings_subpage.html.orig
235+++ chrome/browser/resources/settings/settings_page/settings_subpage.html
236@@ -72,7 +72,7 @@
237 </template>
238 <h1 class="cr-title-text">[[pageTitle]]</h1>
239 <slot name="subpage-title-extra"></slot>
240- <template is="dom-if" if="[[learnMoreUrl]]">
241+ <template is="dom-if" if="[[false]]">
242 <cr-icon-button iron-icon="cr:help-outline" dir="ltr"
243 aria-label="$i18n{learnMore}" on-click="onHelpClick_">
244 </cr-icon-button>
245--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig
246+++ chrome/browser/ui/views/profiles/profile_menu_view.cc
247@@ -176,6 +176,7 @@ void ProfileMenuView::BuildMenu() {
248 }
249
250 gfx::ImageSkia ProfileMenuView::GetSyncIcon() const {
251+ return gfx::ImageSkia();
252 Profile* profile = browser()->profile();
253 if (profile->IsOffTheRecord() || profile->IsGuestSession())
254 return gfx::ImageSkia();
255@@ -450,8 +451,7 @@ void ProfileMenuView::BuildIdentity() {
256 menu_subtitle_);
257 } else {
258 menu_title_ = std::u16string();
259- menu_subtitle_ =
260- l10n_util::GetStringUTF16(IDS_PROFILES_LOCAL_PROFILE_STATE);
261+ menu_subtitle_ = std::u16string();
262 SetProfileIdentityInfo(
263 profile_name, background_color, edit_button_params,
264 ui::ImageModel::FromImage(
265--- chrome/browser/ui/views/sad_tab_view.cc.orig
266+++ chrome/browser/ui/views/sad_tab_view.cc
267@@ -556,15 +556,9 @@ SadTabView::SadTabView(content::WebConte
268 CreateErrorCodeLabel(GetErrorCodeFormatString(), GetCrashedErrorCode()),
269 2, 1.0, views::GridLayout::LEADING, views::GridLayout::LEADING);
270
271- auto help_link = std::make_unique<views::Link>(
272- l10n_util::GetStringUTF16(GetHelpLinkTitle()));
273- help_link->SetCallback(base::BindRepeating(
274- &SadTab::PerformAction, base::Unretained(this), Action::HELP_LINK));
275 layout->StartRowWithPadding(views::GridLayout::kFixedSize, column_set_id,
276 views::GridLayout::kFixedSize,
277 unrelated_vertical_spacing_large);
278- layout->AddView(std::move(help_link), 1.0, 1.0, views::GridLayout::LEADING,
279- views::GridLayout::CENTER);
280 auto action_button = std::make_unique<views::MdTextButton>(
281 base::BindRepeating(&SadTabView::PerformAction, base::Unretained(this),
282 Action::BUTTON),