Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
68db249
Update and rename trivalent-faq-page.patch to trivalent-faq-page.patch
RKNF404 Jul 26, 2026
0d17dbc
Create LICENSE
RKNF404 Jul 26, 2026
09b2233
Create README.md
RKNF404 Jul 26, 2026
66b4c2a
Create add-flag-to-scroll-tabs.patch
RKNF404 Jul 26, 2026
65788f2
Create add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 26, 2026
29c5a1b
Create disable-mei-preload.patch
RKNF404 Jul 27, 2026
967dcc6
Update README.md
RKNF404 Jul 27, 2026
024df46
Update expose-flags.patch
RKNF404 Jul 27, 2026
1bd25a3
Update README.md
RKNF404 Jul 27, 2026
de75a4a
Update expose-flags.patch
RKNF404 Jul 27, 2026
a09658a
Update expose-flags.patch
RKNF404 Jul 27, 2026
a503d4c
Update expose-flags.patch
RKNF404 Jul 27, 2026
51c1eef
Update add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 27, 2026
a286a38
Delete patches/trivalent/ugc/add-flag-to-scroll-tabs.patch
RKNF404 Jul 27, 2026
f15cab6
Update expose-flags.patch
RKNF404 Jul 27, 2026
117abdf
Merge branch 'secureblue:live' into ugc-fork-patchset
RKNF404 Jul 28, 2026
597d8fb
Update add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 28, 2026
67435f4
Update add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 28, 2026
4ae3ea1
Update add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 28, 2026
f494534
Update add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 28, 2026
06d20fa
Update add-flag-for-omnibox-autocomplete-filtering.patch
RKNF404 Jul 28, 2026
5bb4815
Update expose-flags.patch
RKNF404 Jul 28, 2026
0274727
Merge branch 'secureblue:live' into ugc-fork-patchset
RKNF404 Jul 30, 2026
4a4f955
Delete patches/trivalent/ugc/disable-mei-preload.patch
RKNF404 Jul 30, 2026
cd2c11c
Rename add-flag-for-omnibox-autocomplete-filtering.patch to add-flag-…
RKNF404 Jul 30, 2026
9b33999
Update README.md
RKNF404 Jul 30, 2026
fef3d75
Merge branch 'secureblue:live' into ugc-fork-patchset
RKNF404 Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions patches/trivalent/expose-flags.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,26 @@ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, e
See the License for the specific language governing permissions and limitations under the License.
---
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index bdfa3ed504..9478ea82bc 100644
index f477aa7fa2..d85a5f350f 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4824,6 +4824,74 @@ const FeatureEntry::FeatureVariation kSigninPromoOnAvatarPillVariation[] = {
@@ -500,6 +500,15 @@ const FeatureEntry::Choice kEnableBenchmarkingChoices[] = {
variations::switches::kEnableFieldTrialTestingConfig},
};

+const char kScopeOmniboxAutocomplete[] = "scope-omnibox-autocomplete";
+
+const FeatureEntry::Choice kScopeOmniboxAutocompleteChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+ {"Search Only", kScopeOmniboxAutocomplete, "search"},
+ {"Search and Bookmarks", kScopeOmniboxAutocomplete, "search,bookmarks"},
+ {"Search and Chrome Pages", kScopeOmniboxAutocomplete, "search,chrome"},
+ {"Search, Bookmarks, and Chrome Pages", kScopeOmniboxAutocomplete, "search,bookmarks,chrome"}};
+
#if !BUILDFLAG(IS_ANDROID)
const FeatureEntry::Choice kIwaKeyDistributionComponentExpCohortChoices[] = {
{flags_ui::kGenericExperimentChoiceDisabled, "", ""},
@@ -4726,6 +4735,78 @@ const FeatureEntry::FeatureVariation kToolbarGlowUpVariations[] = {
//
// When adding a new choice, add it to the end of the list.
const FeatureEntry kFeatureEntries[] = {
Expand All @@ -28,6 +44,10 @@ index bdfa3ed504..9478ea82bc 100644
+ "by default. This feature is provided by Trivalent.",
+ kOsLinux,
+ FEATURE_VALUE_TYPE(views::features::kMiddleClickCopyPaste)},
+ {"scope-omnibox-autocomplete", "Scope Omnibox Autocomplete",
+ "Limit the scope categories of results that omnibox autocomplete can "
+ "show. This flag is provided by Trivalent via Ungoogled Chromium.",
+ kOsAll, MULTI_VALUE_TYPE(kScopeOmniboxAutocompleteChoices)},
+ {"show-punycode-domains", "Show punycode for IDN domains",
+ "Shows punycode for IDN domains to mitigate IDN homograph attacks. "
+ "Disabled by default. This feature is provided by Trivalent.",
Expand Down
28 changes: 28 additions & 0 deletions patches/trivalent/ugc/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright (c) 2015-2025, The ungoogled-chromium Authors
Copyright (c) 2026, The Trivalent Authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 changes: 5 additions & 0 deletions patches/trivalent/ugc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ungoogled Chromium Patches

These are just some usability and UI patches from Ungoogled Chromium (UGC). No central functionality from UGC is used.

<https://github.com/ungoogled-software/ungoogled-chromium/tree/master/patches>
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
index 22af8003c7..54c42a6871 100644
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -22,6 +22,7 @@
#include <utility>

#include "base/check_op.h"
+#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/format_macros.h"
#include "base/functional/bind.h"
@@ -549,6 +550,19 @@ AutocompleteController::AutocompleteController(
metrics::OmniboxEventProto::UNKNOWN_POSITION),
config_(config) {
config_.provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
+ const std::string kOmniboxScopeFlag = "scope-omnibox-autocomplete";
+ const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
+ if (cmdline->HasSwitch(kOmniboxScopeFlag)) {
+ std::vector<std::string> switch_values = base::SplitString(
+ cmdline->GetSwitchValueASCII(kOmniboxScopeFlag), ",",
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+ config_.provider_types &= AutocompleteProvider::TYPE_KEYWORD | AutocompleteProvider::TYPE_SEARCH |
+ AutocompleteProvider::TYPE_HISTORY_URL;
+ if (std::ranges::contains(switch_values, "bookmarks"))
+ config_.provider_types &= AutocompleteProvider::TYPE_BOOKMARK;
+ if (std::ranges::contains(switch_values, "chrome"))
+ config_.provider_types &= AutocompleteProvider::TYPE_BUILTIN;
+ }

// Providers run in the order they're added. Async providers should run first
// so their async requests can be kicked off before waiting a few milliseconds
diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
index 526c06fdfe..16135f689c 100644
--- a/components/omnibox/browser/history_url_provider.cc
+++ b/components/omnibox/browser/history_url_provider.cc
@@ -487,6 +487,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
matches_.push_back(what_you_typed_match);

+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("scope-omnibox-autocomplete"))
+ return;
+
// We'll need the history service to run both passes, so try to obtain it.
history::HistoryService* const history_service =
client()->GetHistoryService();
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index ff56a4fb37..bea9159cde 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -15,6 +15,7 @@
#include <vector>

#include "base/base64.h"
+#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
@@ -682,6 +683,9 @@ void SearchProvider::Run(bool query_is_private) {
}

void SearchProvider::DoHistoryQuery(bool minimal_changes) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("scope-omnibox-autocomplete"))
+ return;
+
// The history query results are synchronous, so if minimal_changes is true,
// we still have the last results and don't need to do anything.
if (minimal_changes)
diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc
index d5d9a14c8d..6875acd917 100644
--- a/components/url_formatter/url_fixer.cc
+++ b/components/url_formatter/url_fixer.cc
@@ -10,6 +10,8 @@
#include <string_view>

#include "base/check_op.h"
+#include "base/command_line.h"
+#include "base/strings/string_split.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -635,7 +637,16 @@ GURL FixupURLInternal(const std::string& text,
desired_tld, &url);
}
if (chrome_url && !parts.host.is_valid()) {
- url.append(kChromeUIDefaultHost);
+ bool append = true;
+ const std::string kOmniboxScopeFlag = "scope-omnibox-autocomplete";
+ const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
+ if (cmdline->HasSwitch(kOmniboxScopeFlag)) {
+ std::vector<std::string> switch_values = base::SplitString(
+ cmdline->GetSwitchValueASCII(kOmniboxScopeFlag), ",",
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+ append = std::ranges::contains(switch_values, "chrome");
+ }
+ if (append) url.append(kChromeUIDefaultHost);
}
FixupPort(trimmed, parts.port, &url);
FixupPath(trimmed, parts.path, &url);
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
Copyright (c) 2015-2025, The ungoogled-chromium Authors
Copyright (c) 2026, The Trivalent Authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index d347c428ac..29faea895d 100644
--- a/chrome/browser/chrome_browser_main.cc
Expand Down