Skip to content

Commit

Permalink
#1110 fix unlogging from Youtube
Browse files Browse the repository at this point in the history
removes the preset limit for partitioned cookies (10240 bytes max). since they are all and always partitioned, the limits applied must be the general ones.
  • Loading branch information
uazo committed May 18, 2024
1 parent e2961d1 commit 56006f0
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions build/patches/Partitioning-all-cookies-by-top-frame-domain.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
...storage_access_grant_permission_context.cc | 12 ++++
.../experiment/experiment_manager_impl.cc | 1 +
.../core/browser/cookie_settings.cc | 2 +
.../core/common/cookie_settings_base.cc | 65 -------------------
.../core/common/cookie_settings_base.cc | 59 -------------------
...ioning-all-cookies-by-top-frame-domain.inc | 3 +
...ioning-all-cookies-by-top-frame-domain.inc | 1 +
...ioning-all-cookies-by-top-frame-domain.inc | 1 +
...ioning-all-cookies-by-top-frame-domain.inc | 9 +++
net/cookies/canonical_cookie.cc | 13 +---
net/cookies/cookie_deletion_info.cc | 3 +-
net/cookies/cookie_monster.cc | 1 +
net/cookies/parsed_cookie.h | 6 +-
.../sqlite/sqlite_persistent_cookie_store.cc | 8 +++
net/url_request/url_request_http_job.cc | 10 +--
net/url_request/url_request_http_job.cc | 10 +---
services/network/cookie_settings.cc | 5 +-
services/network/restricted_cookie_manager.cc | 6 ++
.../modules/cookie_store/cookie_init.idl | 2 +-
.../modules/cookie_store/cookie_store.cc | 3 +
.../cookie_store_delete_options.idl | 2 +-
ui/webui/webui_allowlist.cc | 1 +
22 files changed, 70 insertions(+), 98 deletions(-)
23 files changed, 71 insertions(+), 92 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
Expand Down Expand Up @@ -158,7 +159,7 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/c
constexpr StorageAccessResult GetStorageAccessResult(
ThirdPartyCookieAllowMechanism mechanism) {
switch (mechanism) {
@@ -558,69 +548,14 @@ CookieSettingsBase::DecideAccess(const GURL& url,
@@ -534,63 +524,14 @@ CookieSettingsBase::DecideAccess(const GURL& url,
return BlockAllCookies{};
}

Expand Down Expand Up @@ -195,20 +196,12 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/c
- ThirdPartyCookieAllowMechanism::kAllowBy3PCDHeuristics};
- }
-
- SettingInfo tpcd_metadata_info;
- bool is_allowed_by_tpcd_metadata_grants =
- IsAllowedBy3pcdMetadataGrantsSettings(url, first_party_url, overrides,
- &tpcd_metadata_info);
-
- if (!is_allowed_by_tpcd_metadata_grants ||
- !IsTpcdDtGracePeriodEnforced(tpcd_metadata_info)) {
- if (IsAllowedByTopLevel3pcdTrialSettings(first_party_url, overrides)) {
- return AllowAllCookies{
- ThirdPartyCookieAllowMechanism::kAllowByTopLevel3PCD};
- }
- if (IsAllowedBy3pcdTrialSettings(url, first_party_url, overrides)) {
- return AllowAllCookies{ThirdPartyCookieAllowMechanism::kAllowBy3PCD};
- }
- if (IsAllowedByTopLevel3pcdTrialSettings(first_party_url, overrides)) {
- return AllowAllCookies{
- ThirdPartyCookieAllowMechanism::kAllowByTopLevel3PCD};
- }
- if (IsAllowedBy3pcdTrialSettings(url, first_party_url, overrides)) {
- return AllowAllCookies{ThirdPartyCookieAllowMechanism::kAllowBy3PCD};
- }
-
- // Enterprise Policies:
Expand All @@ -219,7 +212,9 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/c
- }
-
- // Chrome controlled mechanisms (ex. 3PCD Metadata Grants):
- if (is_allowed_by_tpcd_metadata_grants &&
- SettingInfo tpcd_metadata_info;
- if (IsAllowedBy3pcdMetadataGrantsSettings(url, first_party_url, overrides,
- &tpcd_metadata_info) &&
- !IgnoreTpcdDtGracePeriodMetadataEntry(tpcd_metadata_info)) {
- return AllowAllCookies{TpcdMetadataSourceToAllowMechanism(
- tpcd_metadata_info.metadata.tpcd_metadata_rule_source())};
Expand Down Expand Up @@ -305,6 +300,17 @@ diff --git a/net/cookies/cookie_deletion_info.cc b/net/cookies/cookie_deletion_i
!cookie_partition_key_collection.Contains(*cookie.PartitionKey())) {
return false;
}
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -2215,6 +2215,7 @@ size_t CookieMonster::GarbageCollectPartitionedCookies(
if (cookie_partition_it == partitioned_cookies_.end())
return num_deleted;

+ if ((false))
if (NumBytesInCookieMapForKey(*cookie_partition_it->second.get(), key) >
kPerPartitionDomainMaxCookieBytes ||
cookie_partition_it->second->count(key) > kPerPartitionDomainMaxCookies) {
diff --git a/net/cookies/parsed_cookie.h b/net/cookies/parsed_cookie.h
--- a/net/cookies/parsed_cookie.h
+++ b/net/cookies/parsed_cookie.h
Expand Down

0 comments on commit 56006f0

Please sign in to comment.