Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions patches/add-feature-to-show-puny-code.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ index 63b6e1583a837..a0b8b8c588161 100644
// on a per-component basis.
std::u16string out16;
diff --git a/url/url_features.cc b/url/url_features.cc
index 584e93ac72bd1..b89fea48914d6 100644
index 89884ac867..ff2f72cf7c 100644
--- a/url/url_features.cc
+++ b/url/url_features.cc
@@ -7,6 +7,10 @@
Expand All @@ -33,9 +33,9 @@ index 584e93ac72bd1..b89fea48914d6 100644
+ "ShowPunycodeDomains",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
BASE_FEATURE(kUseIDNA2008NonTransitional,
"UseIDNA2008NonTransitional",
base::FEATURE_ENABLED_BY_DEFAULT);
// Kill switch for crbug.com/1416006.
BASE_FEATURE(kStandardCompliantNonSpecialSchemeURLParsing,
"StandardCompliantNonSpecialSchemeURLParsing",
diff --git a/url/url_features.h b/url/url_features.h
index fa4493a12e9c1..70c5d811122fe 100644
--- a/url/url_features.h
Expand Down
22 changes: 19 additions & 3 deletions patches/disable-gen-ai-features-and-logging-by-default.patch
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,31 @@ index 9a00400829..91a9b429e3 100644

#if BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 3ebb85bbe3..1193f35958 100644
index e856d9cf62..d41a8b15a2 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1666,7 +1666,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
@@ -1505,7 +1505,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
prefs::kServiceWorkerToControlSrcdocIframeEnabled, true);
registry->RegisterBooleanPref(prefs::kReduceAcceptLanguageEnabled, true);
registry->RegisterBooleanPref(policy::policy_prefs::kBuiltInAIAPIsEnabled,
- true);
+ false);
registry->RegisterBooleanPref(
prefs::kClearWindowNameForNewBrowsingContextGroup, true);
registry->RegisterBooleanPref(prefs::kPrefetchWithServiceWorkerEnabled, true);
diff --git a/components/omnibox/browser/omnibox_prefs.cc b/components/omnibox/browser/omnibox_prefs.cc
index b7126a3b53..f1f7b6bec0 100644
--- a/components/omnibox/browser/omnibox_prefs.cc
+++ b/components/omnibox/browser/omnibox_prefs.cc
@@ -50,8 +50,8 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
// TODO(crbug.com/422744656): Remove `kAIModeSearchSuggestSettings` pref once
// `kAIModeSettings` is implemented.
registry->RegisterIntegerPref(omnibox::kAIModeSearchSuggestSettings,
- kAIModeSearchSuggestAllowed);
- registry->RegisterIntegerPref(omnibox::kAIModeSettings, kAIModeAllowed);
+ 1);
+ registry->RegisterIntegerPref(omnibox::kAIModeSettings, 1);
}

// static
void SetUserPreferenceForZeroSuggestCachedResponse(

8 changes: 4 additions & 4 deletions patches/disable-global-shortcuts-portal.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
index c98ecc3600..e4a772c18a 100644
index b6985bd63a..c8f0e2e960 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
@@ -23,7 +23,7 @@ namespace {
@@ -25,7 +25,7 @@ namespace {
#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DBUS)
BASE_FEATURE(kGlobalShortcutsPortal,
"GlobalShortcutsPortal",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif
} // namespace
constexpr char kChannelEnvVar[] = "CHROME_VERSION_EXTRA";

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
20 changes: 10 additions & 10 deletions patches/disable-infobar-for-builds-without-api-key.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/chrome/browser/ui/startup/infobar_utils.cc b/chrome/browser/ui/startup/infobar_utils.cc
index d3ad537ab2055..1fcf5da985d74 100644
index d52ef581ac..d4e328ea32 100644
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -154,10 +154,6 @@ void AddInfoBarsIfNecessary(Browser* browser,
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
@@ -171,10 +171,6 @@ void AddInfoBarsIfNecessary(Browser* browser,
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);

- if (!google_apis::HasAPIKeyConfigured()) {
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
- }
- if (!google_apis::HasAPIKeyConfigured()) {
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
- }
-
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
7 changes: 4 additions & 3 deletions patches/disable-jit-for-internal-pages.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index e5ce608907f72..09159a4e83115 100644
index e856d9cf62..9e80d0ae42 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -8013,9 +8013,10 @@ bool ChromeContentBrowserClient::IsJitDisabledForSite(
@@ -7590,10 +7590,10 @@ bool ChromeContentBrowserClient::IsJitDisabledForSite(
nullptr) == CONTENT_SETTING_BLOCK;
}

- // Only disable JIT for web schemes.
- if (!site_url.SchemeIsHTTPOrHTTPS())
- if (!site_url.SchemeIsHTTPOrHTTPS()) {
- return false;
- }
+ // Only force disable JIT for pages that aren't web schemes, aren't file schemes, and aren't extensions
+ if (!site_url.SchemeIsHTTPOrHTTPS() && !site_url.SchemeIsFile()
+ && !site_url.SchemeIs("chrome-extension"))
Expand Down
13 changes: 0 additions & 13 deletions patches/enable-private-network-access-restriction.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This is ripped from a Vanadium patch to achieve the same thing
diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc
index 3a7d5b3d4a6ab..13cce26bec510 100644
index 4d550b6b82892..e7503446578b9 100644
--- a/components/content_settings/core/browser/content_settings_default_provider.cc
+++ b/components/content_settings/core/browser/content_settings_default_provider.cc
@@ -62,7 +62,7 @@ const char kObsoletePpapiBrokerDefaultPref[] =
Expand All @@ -12,16 +11,16 @@ index 3a7d5b3d4a6ab..13cce26bec510 100644
// This setting was accidentally bound to a UI surface intended for a different
// setting (https://crbug.com/364820109). It should not have been settable
// except via enterprise policy, so it is temporarily cleaned up here to revert
@@ -72,7 +72,7 @@ constexpr char kBug364820109DefaultSettingToClear[] =
"profile.default_content_setting_values.javascript_jit";
@@ -70,7 +70,7 @@ constexpr char kObsoleteFederatedIdentityDefaultPref[] =
// TODO(https://crbug.com/367181093): clean this up.
constexpr char kBug364820109AlreadyWorkedAroundPref[] =
"profile.did_work_around_bug_364820109_default";
-#endif // !BUILDFLAG(IS_IOS)
+#endif // !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)

ContentSetting GetDefaultValue(const WebsiteSettingsInfo* info) {
const base::Value& initial_default = info->initial_default_value();
@@ -152,10 +152,10 @@ void DefaultProvider::RegisterProfilePrefs(
@@ -123,10 +123,10 @@ void DefaultProvider::RegisterProfilePrefs(
#endif // !BUILDFLAG(IS_IOS)
registry->RegisterIntegerPref(kObsoleteFederatedIdentityDefaultPref, 0);

Expand All @@ -34,27 +33,24 @@ index 3a7d5b3d4a6ab..13cce26bec510 100644
}

DefaultProvider::DefaultProvider(PrefService* prefs,
@@ -396,13 +396,13 @@ void DefaultProvider::DiscardOrMigrateObsoletePreferences() {
@@ -364,10 +364,10 @@ void DefaultProvider::DiscardOrMigrateObsoletePreferences() {
#endif // !BUILDFLAG(IS_IOS)
prefs_->ClearPref(kObsoleteFederatedIdentityDefaultPref);

-#if !BUILDFLAG(IS_IOS)
+#if !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)
// TODO(https://crbug.com/367181093): clean this up.
if (!prefs_->GetBoolean(kBug364820109AlreadyWorkedAroundPref)) {
prefs_->ClearPref(kBug364820109DefaultSettingToClear);
prefs_->SetBoolean(kBug364820109AlreadyWorkedAroundPref, true);
}
prefs_->ClearPref(kBug364820109AlreadyWorkedAroundPref);
-#endif // !BUILDFLAG(IS_IOS)
+#endif // !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)
}

void DefaultProvider::RecordHistogramMetrics() {
diff --git a/components/content_settings/core/browser/content_settings_pref_provider.cc b/components/content_settings/core/browser/content_settings_pref_provider.cc
index 58d8b0db8fd7e..98cdc365086bc 100644
index c7aeb13ca4211..55bbe4697bb3d 100644
--- a/components/content_settings/core/browser/content_settings_pref_provider.cc
+++ b/components/content_settings/core/browser/content_settings_pref_provider.cc
@@ -58,7 +58,7 @@ const char
@@ -57,7 +57,7 @@ const char
constexpr char kObsoleteFederatedIdentityActiveSesssionExceptionsPref[] =
"profile.content_settings.exceptions.fedcm_active_session";

Expand All @@ -63,16 +59,16 @@ index 58d8b0db8fd7e..98cdc365086bc 100644
// This setting was accidentally bound to a UI surface intended for a different
// setting (https://crbug.com/364820109). It should not have been settable
// except via enterprise policy, so it is temporarily cleaned up here to revert
@@ -68,7 +68,7 @@ constexpr char kBug364820109ExceptionSettingToClear[] =
"profile.content_settings.exceptions.javascript_jit";
@@ -65,7 +65,7 @@ constexpr char kObsoleteFederatedIdentityActiveSesssionExceptionsPref[] =
// TODO(https://crbug.com/367181093): clean this up.
constexpr char kBug364820109AlreadyWorkedAroundPref[] =
"profile.did_work_around_bug_364820109_exceptions";
-#endif // !BUILDFLAG(IS_IOS)
+#endif // !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)

} // namespace

@@ -106,10 +106,10 @@ void PrefProvider::RegisterProfilePrefs(
@@ -103,10 +103,10 @@ void PrefProvider::RegisterProfilePrefs(
kObsoleteGetDisplayMediaSetAutoSelectAllScreensAllowedForUrlsExceptionsPref);
registry->RegisterListPref(
kObsoleteFederatedIdentityActiveSesssionExceptionsPref);
Expand All @@ -85,17 +81,14 @@ index 58d8b0db8fd7e..98cdc365086bc 100644
}

PrefProvider::PrefProvider(PrefService* prefs,
@@ -444,13 +444,13 @@ void PrefProvider::DiscardOrMigrateObsoletePreferences() {
@@ -442,10 +442,10 @@ void PrefProvider::DiscardOrMigrateObsoletePreferences() {
kObsoleteGetDisplayMediaSetAutoSelectAllScreensAllowedForUrlsExceptionsPref);
prefs_->ClearPref(kObsoleteFederatedIdentityActiveSesssionExceptionsPref);

-#if !BUILDFLAG(IS_IOS)
+#if !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)
// TODO(https://crbug.com/367181093): clean this up.
if (!prefs_->GetBoolean(kBug364820109AlreadyWorkedAroundPref)) {
prefs_->ClearPref(kBug364820109ExceptionSettingToClear);
prefs_->SetBoolean(kBug364820109AlreadyWorkedAroundPref, true);
}
prefs_->ClearPref(kBug364820109AlreadyWorkedAroundPref);
-#endif // !BUILDFLAG(IS_IOS)
+#endif // !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)
}
Expand Down
11 changes: 2 additions & 9 deletions patches/user-preferences.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro
index 8db06cee98..d1c96333e9 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -180,6 +180,24 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() {
@@ -180,6 +180,22 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() {
}
s_allowlist = new PrefsUtil::TypedPrefMap();

Expand All @@ -19,8 +19,6 @@ index 8db06cee98..d1c96333e9 100644
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kNetworkServiceSandboxEnabled] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kManagedPrivateNetworkAccessRestrictionsEnabled] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kIncognitoLaunch] =
+ settings_api::PrefType::kBoolean;
+
Expand Down Expand Up @@ -58,7 +56,7 @@ index d5079082c7..d75f6a430f 100644
.bullet-line {
align-items: center;
display: flex;
@@ -385,6 +389,46 @@
@@ -385,6 +389,41 @@
on-click="onChromeCertificatesClick_">
</cr-link-row>
</if>
Expand All @@ -70,11 +68,6 @@ index d5079082c7..d75f6a430f 100644
+ sub-label="Opens new sessions and external links in Incognito tabs">
+ </settings-toggle-button>
+ <settings-toggle-button class="cr-row"
+ pref="{{prefs.managed_private_network_access_restrictions_enabled}}"
+ label="Private Network Access Restrictions"
+ sub-label="Prevents websites from freely accessing private (LAN) addresses">
+ </settings-toggle-button>
+ <settings-toggle-button class="cr-row"
+ pref="{{prefs.disable_3d_apis}}"
+ label="Disable 3D APIs"
+ sub-label="Disable features like WebGL and Pepper 3D">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] switch to -fstack-protector-strong
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 97263593eac89..f07539c610d18 100644
index b165d9dd4004a..8392f2e680629 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -383,7 +383,7 @@ config("compiler") {
@@ -395,7 +395,7 @@ config("compiler") {
} else if ((is_posix && !is_nacl) || is_fuchsia) {
if (current_os != "aix") {
# Not available on aix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] enable -fwrapv in Clang for non-UBSan builds
1 file changed, 4 insertions(+)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index f07539c610d18..356773724c1b7 100644
index 8392f2e680629..450a54167e293 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -399,6 +399,10 @@ config("compiler") {
@@ -411,6 +411,10 @@ config("compiler") {
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] enable -ftrivial-auto-var-init=zero
1 file changed, 4 insertions(+)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 356773724c1b7..24101607a2ef9 100644
index 450a54167e293..faf1ff9663e64 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -403,6 +403,10 @@ config("compiler") {
@@ -415,6 +415,10 @@ config("compiler") {
cflags += [ "-fwrapv" ]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: [PATCH] disable navigation error correction by default
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc
index dcaee00297897..54eb41fb061da 100644
index 9ae20dbb0ed2a..383699710892b 100644
--- a/chrome/browser/net/profile_network_context_service.cc
+++ b/chrome/browser/net/profile_network_context_service.cc
@@ -530,7 +530,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParams(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] disable hyperlink auditing by default
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 3ebb85bbe3c48..2dc19c66cd1a1 100644
index e856d9cf62853..afa44031a366b 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1568,7 +1568,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
@@ -1408,7 +1408,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Date: Tue, 6 Mar 2018 00:27:41 -0500
Subject: [PATCH] disable showing popular sites by default

---
components/ntp_tiles/features.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
components/ntp_tiles/features.cc | 2 +-
components/ntp_tiles/most_visited_sites.cc | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/components/ntp_tiles/features.cc b/components/ntp_tiles/features.cc
index b7353c48a6923..158476da9a2e9 100644
index d142c1aa45e45..fd9e3cb948293 100644
--- a/components/ntp_tiles/features.cc
+++ b/components/ntp_tiles/features.cc
@@ -15,7 +15,7 @@ const char kPopularSitesFieldTrialName[] = "NTPPopularSites";
Expand All @@ -20,11 +21,35 @@ index b7353c48a6923..158476da9a2e9 100644

BASE_FEATURE(kNtpMostLikelyFaviconsFromServerFeature,
"NTPMostLikelyFaviconsFromServer",
@@ -23,6 +23,6 @@ BASE_FEATURE(kNtpMostLikelyFaviconsFromServerFeature,
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
index 2aae51db257bf..f69d71898e796 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -256,9 +256,11 @@ void MostVisitedSites::AddMostVisitedURLsObserver(Observer* observer,
if (!is_observing_) {
is_observing_ = true;
if (popular_sites_ && NeedPopularSites(prefs_, GetMaxNumSites())) {
+#if defined(ENABLE_POPULAR_SITES)
popular_sites_->MaybeStartFetch(
false, base::BindOnce(&MostVisitedSites::OnPopularSitesDownloaded,
base::Unretained(this)));
+#endif // defined(ENABLE_POPULAR_SITES)
}

BASE_FEATURE(kUsePopularSitesSuggestions,
"UsePopularSitesSuggestions",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
if (top_sites_) {
@@ -551,6 +553,7 @@ MostVisitedSites::CreatePopularSitesSections(
return sections;
}

+#if defined(ENABLE_POPULAR_SITES)
const std::set<std::string> no_hosts;
for (const auto& section_type_and_sites : popular_sites()->sections()) {
SectionType type = section_type_and_sites.first;
@@ -568,6 +571,7 @@ MostVisitedSites::CreatePopularSitesSections(
/*num_max_tiles=*/GetMaxNumSites());
}
}
+#endif // defined(ENABLE_POPULAR_SITES)
return sections;
}

} // namespace ntp_tiles
Loading