Skip to content

Commit

Permalink
more patches added
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo committed Nov 24, 2023
1 parent 6c36a08 commit b4fc6f7
Show file tree
Hide file tree
Showing 44 changed files with 1,141 additions and 1,894 deletions.
335 changes: 294 additions & 41 deletions build/patches/00Add-cromite-flags-support.patch

Large diffs are not rendered by default.

27 changes: 9 additions & 18 deletions build/patches/00Disable-BackForwardCache.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,15 @@ Subject: Disable BackForwardCache

License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
content/public/common/content_features.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
.../common/content_features_cc/Disable-BackForwardCache.inc | 1 +
1 file changed, 1 insertion(+)
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc

diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -65,9 +65,9 @@ BASE_FEATURE(kBackgroundFetch,
base::FEATURE_ENABLED_BY_DEFAULT);

// Enable using the BackForwardCache.
-BASE_FEATURE(kBackForwardCache,
- "BackForwardCache",
- base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kBackForwardCache, // ****
+ "BackForwardCache", // always disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite

// Enable showing a page preview during back/forward navigations.
BASE_FEATURE(kBackForwardTransitions,
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc b/cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kBackForwardCache);
--
2.25.1
37 changes: 10 additions & 27 deletions build/patches/00Disable-FedCm.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,17 @@ Subject: Disable FedCm

License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
content/public/common/content_features.cc | 6 +++---
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
.../content/public/common/content_features_cc/Disable-FedCm.inc | 1 +
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc

diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -337,7 +337,7 @@ BASE_FEATURE(kEnableServiceWorkersForChromeScheme,
// by the flag in RuntimeEnabledFeatures on the blink side. See also
// the use of kSetOnlyIfOverridden in content/child/runtime_features.cc.
// We enable it here by default to support use in origin trials.
-BASE_FEATURE(kFedCm, "FedCm", base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kFedCm, "FedCm", base::FEATURE_DISABLED_BY_DEFAULT);

// Field trial boolean parameter which indicates whether FedCM IDP sign-out
// is enabled.
@@ -385,9 +385,9 @@ BASE_FEATURE(kFedCmSelectiveDisclosure,

// Enables the IDP signin status API for use with FedCM, including avoiding
// network requests when not signed in and mismatch handling.
-BASE_FEATURE(kFedCmIdpSigninStatusEnabled, // disabled
+BASE_FEATURE(kFedCmIdpSigninStatusEnabled, // enabled
"FedCmIdpSigninStatusEnabled", // by default
- base::FEATURE_DISABLED_BY_DEFAULT); // on bromite
+ base::FEATURE_ENABLED_BY_DEFAULT); // on bromite

// Enables bypassing the well-known file enforcement.
BASE_FEATURE(kFedCmWithoutWellKnownEnforcement,
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc b/cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kFedCm);
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
Expand Down
31 changes: 11 additions & 20 deletions build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Subject: Disable FirstPartySets and StorageAccessAPI

License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
components/privacy_sandbox/privacy_sandbox_prefs.cc | 2 +-
components/privacy_sandbox/tracking_protection_prefs.cc | 4 ++--
content/public/common/content_features.cc | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
components/privacy_sandbox/privacy_sandbox_prefs.cc | 2 +-
components/privacy_sandbox/tracking_protection_prefs.cc | 4 ++--
.../Disable-FirstPartySets-and-StorageAccessAPI.inc | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc

diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc
--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
Expand Down Expand Up @@ -40,21 +41,11 @@ diff --git a/components/privacy_sandbox/tracking_protection_prefs.cc b/component
registry->RegisterBooleanPref(
prefs::kEnableDoNotTrack, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -405,9 +405,9 @@ BASE_FEATURE(kWebIdentityMDocs,
base::FEATURE_DISABLED_BY_DEFAULT);

// Enables usage of First Party Sets to determine cookie availability.
-BASE_FEATURE(kFirstPartySets,
- "FirstPartySets",
- base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kFirstPartySets, // always
+ "FirstPartySets", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite

// Controls whether to clear sites data on FPS transitions.
const base::FeatureParam<bool> kFirstPartySetsClearSiteDataOnChangedSets{
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc b/cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kFirstPartySets);
--
2.25.1
36 changes: 13 additions & 23 deletions build/patches/00Disable-GetInstalledRelatedApps-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Subject: Disable GetInstalledRelatedApps API

License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../components/installedapp/InstalledAppProviderImpl.java | 1 +
.../browser/installedapp/installed_app_provider_impl_win.cc | 1 +
content/public/common/content_features.cc | 4 ++--
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
.../components/installedapp/InstalledAppProviderImpl.java | 1 +
content/browser/installedapp/installed_app_provider_impl_win.cc | 1 +
.../content_features_cc/Disable-GetInstalledRelatedApps-API.inc | 2 ++
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
4 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc

diff --git a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java
--- a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java
Expand All @@ -32,24 +33,13 @@ diff --git a/content/browser/installedapp/installed_app_provider_impl_win.cc b/c
ComPtr<ILauncherStatics4> launcher_statics;
HRESULT hr = base::win::RoActivateInstance(
base::win::ScopedHString::Create(RuntimeClass_Windows_System_Launcher)
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -451,12 +451,12 @@ BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_DISABLED_BY_DEFAULT);

// Kill switch for the GetInstalledRelatedApps API.
-BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_DISABLED_BY_DEFAULT);

// Allow Windows specific implementation for the GetInstalledRelatedApps API.
BASE_FEATURE(kInstalledAppProvider,
"InstalledAppProvider",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);

// Enable support for isolated web apps. This will guard features like serving
// isolated web apps via the isolated-app:// scheme, and other advanced isolated
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc b/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc
@@ -0,0 +1,2 @@
+SET_CROMITE_FEATURE_DISABLED(kInstalledApp);
+SET_CROMITE_FEATURE_DISABLED(kInstalledAppProvider);
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
Expand Down
155 changes: 49 additions & 106 deletions build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,27 @@ samesite=none first-party cookies are sent in third-party contexts.

License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../net/profile_network_context_service.cc | 8 ++++----
.../core/common/cookie_settings_base.cc | 2 +-
.../content_settings/core/common/features.cc | 4 ++--
components/permissions/features.cc | 4 ++--
content/public/common/content_features.cc | 4 ++--
net/base/features.cc | 16 ++++++++--------
net/cookies/canonical_cookie.cc | 12 +-----------
net/cookies/cookie_deletion_info.cc | 3 ++-
net/cookies/parsed_cookie.h | 7 ++++++-
.../sqlite/sqlite_persistent_cookie_store.cc | 10 ++++++++++
net/url_request/url_request_http_job.cc | 2 +-
services/network/restricted_cookie_manager.cc | 3 +++
.../modules/cookie_store/cookie_init.idl | 2 +-
.../modules/cookie_store/cookie_store.cc | 12 ++++++++++++
.../cookie_store/cookie_store_delete_options.idl | 2 +-
ui/webui/webui_allowlist.cc | 1 +
16 files changed, 57 insertions(+), 35 deletions(-)
.../browser/net/profile_network_context_service.cc | 8 ++++----
.../core/common/cookie_settings_base.cc | 2 +-
.../Partitioning-all-cookies-by-top-frame-domain.inc | 1 +
.../Partitioning-all-cookies-by-top-frame-domain.inc | 1 +
.../Partitioning-all-cookies-by-top-frame-domain.inc | 1 +
.../Partitioning-all-cookies-by-top-frame-domain.inc | 5 +++++
net/cookies/canonical_cookie.cc | 12 +-----------
net/cookies/cookie_deletion_info.cc | 3 ++-
net/cookies/parsed_cookie.h | 7 ++++++-
net/extras/sqlite/sqlite_persistent_cookie_store.cc | 10 ++++++++++
net/url_request/url_request_http_job.cc | 2 +-
services/network/restricted_cookie_manager.cc | 3 +++
.../renderer/modules/cookie_store/cookie_init.idl | 2 +-
.../renderer/modules/cookie_store/cookie_store.cc | 12 ++++++++++++
.../cookie_store/cookie_store_delete_options.idl | 2 +-
ui/webui/webui_allowlist.cc | 1 +
16 files changed, 51 insertions(+), 21 deletions(-)
create mode 100644 cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
create mode 100644 cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
create mode 100644 cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
create mode 100644 cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc

diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc
--- a/chrome/browser/net/profile_network_context_service.cc
Expand Down Expand Up @@ -61,95 +65,34 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/c
: ThirdPartyBlockingScope::kUnpartitionedAndPartitioned;
}
return {block_third ? CONTENT_SETTING_BLOCK : setting, scope,
diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc
--- a/components/content_settings/core/common/features.cc
+++ b/components/content_settings/core/common/features.cc
@@ -79,8 +79,8 @@ BASE_FEATURE(kImprovedSemanticsActivityIndicators,
base::FEATURE_DISABLED_BY_DEFAULT);

BASE_FEATURE(kTrackingProtection3pcd,
- "TrackingProtection3pcd",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "TrackingProtection3pcd", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // by default

} // namespace features
} // namespace content_settings
diff --git a/components/permissions/features.cc b/components/permissions/features.cc
--- a/components/permissions/features.cc
+++ b/components/permissions/features.cc
@@ -156,8 +156,8 @@ BASE_FEATURE(kMitigateUnpartitionedWebviewPermissions,
// This includes enabling prompts, a new settings page and page info and
// omnibox integration.
BASE_FEATURE(kPermissionStorageAccessAPI,
- "PermissionStorageAccessAPI",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "PermissionStorageAccessAPI", // guard
+ base::FEATURE_DISABLED_BY_DEFAULT); // this

// When enabled "window-placement" may be used as an alias for
// "window-management". Additionally, reverse mappings (i.e. enum to string)
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -186,8 +186,8 @@ BASE_FEATURE(kCompositeBGColorAnimation,
// server side testing without cookies.
// (See https://developer.chrome.com/en/docs/privacy-sandbox/chrome-testing)
BASE_FEATURE(kCookieDeprecationFacilitatedTesting,
- "CookieDeprecationFacilitatedTesting",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "CookieDeprecationFacilitatedTesting", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // by default

// Set whether to enable cookie deprecation API for off-the-record profiles.
const base::FeatureParam<bool>
diff --git a/net/base/features.cc b/net/base/features.cc
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -260,8 +260,8 @@ BASE_FEATURE(kWaitForFirstPartySetsInit,
base::FEATURE_DISABLED_BY_DEFAULT);

BASE_FEATURE(kPartitionedCookies,
- "PartitionedCookies",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "PartitionedCookies", // guard this
+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this

BASE_FEATURE(kBlockTruncatedCookies,
"BlockTruncatedCookies",
@@ -272,8 +272,8 @@ BASE_FEATURE(kStaticKeyPinningEnforcement,
base::FEATURE_ENABLED_BY_DEFAULT);

BASE_FEATURE(kCookieDomainRejectNonASCII,
- "CookieDomainRejectNonASCII",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "CookieDomainRejectNonASCII", // guard this
+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this

// Enables partitioning of third party storage (IndexedDB, CacheStorage, etc.)
// by the top level site to reduce fingerprinting.
@@ -446,8 +446,8 @@ BASE_FEATURE(kEnableSchemeBoundCookies,

// Enable third-party cookie blocking from the command line.
BASE_FEATURE(kForceThirdPartyCookieBlocking,
- "ForceThirdPartyCookieBlockingEnabled",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "ForceThirdPartyCookieBlockingEnabled", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // by default

BASE_FEATURE(kEnableEarlyHintsOnHttp11,
"EnableEarlyHintsOnHttp11",
@@ -469,8 +469,8 @@ BASE_FEATURE(kDigestAuthEnableSecureAlgorithms,
// are disabled by default. Partitioned storage will not be allowed if
// third-party cookies are disabled due to a specific rule.
BASE_FEATURE(kThirdPartyPartitionedStorageAllowedByDefault,
- "ThirdPartyPartitionedStorageAllowedByDefault",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "ThirdPartyPartitionedStorageAllowedByDefault", // must be
+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled

BASE_FEATURE(kPriorityHeader,
"PriorityHeader",
diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kTrackingProtection3pcd);
diff --git a/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kPermissionStorageAccessAPI);
diff --git a/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kCookieDeprecationFacilitatedTesting);
diff --git a/cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc
@@ -0,0 +1,5 @@
+SET_CROMITE_FEATURE_ENABLED(kPartitionedCookies);
+SET_CROMITE_FEATURE_ENABLED(kCookieDomainRejectNonASCII);
+
+SET_CROMITE_FEATURE_DISABLED(kForceThirdPartyCookieBlocking);
+SET_CROMITE_FEATURE_DISABLED(kThirdPartyPartitionedStorageAllowedByDefault);
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc
--- a/net/cookies/canonical_cookie.cc
+++ b/net/cookies/canonical_cookie.cc
Expand Down
Loading

0 comments on commit b4fc6f7

Please sign in to comment.