Fix Clear-Site-Data header not clearing memory cache [chromium/src : main]

0 views
Skip to first unread message

Christian Dullweber (Gerrit)

unread,
4:47 AM (7 hours ago) 4:47 AM
to Javier Garcia Visiedo, android-bu...@system.gserviceaccount.com, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, dullweb...@chromium.org, msrame...@chromium.org
Attention needed from Javier Garcia Visiedo

Christian Dullweber added 6 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Christian Dullweber . resolved

Thank you for fixing this! I have a few small questions

File content/browser/browsing_data/browsing_data_remover_impl.cc
Line 556, Patchset 5 (Latest): const std::set<url::Origin>& origins = filter_builder->GetOrigins();
Christian Dullweber . unresolved

The filter can also match registrable domains. I think we also need to call GetRegisterableDomains().

Line 562, Patchset 5 (Latest): }
Christian Dullweber . unresolved

What do you think about moving this logic to a new BuildSiteFilter() function? That also allows us to more easily test the filtering logic

Line 574, Patchset 5 (Latest): target_sites.contains(lock.agent_cluster_key().GetSite());
Christian Dullweber . unresolved

Do we need to check AgentClusterKey::IsSiteKeyed() ?

Line 577, Patchset 5 (Latest): rph->GetRendererInterface()->PurgeResourceCache(base::DoNothing());
Christian Dullweber . unresolved

We usually wait for deletions to be done so that this class can report when all operations have completed. You can call CreateTaskCompletionClosure() to get a callback that counts the remaining tasks

File content/browser/browsing_data/clear_site_data_handler_browsertest.cc
Line 435, Patchset 5 (Latest): int cache_request_count_ GUARDED_BY(cache_request_count_lock_) = 0;
Christian Dullweber . unresolved

We could probably use a std::atomic<int> instead of int+lock?

Open in Gerrit

Related details

Attention is currently required from:
  • Javier Garcia Visiedo
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I74904e80bdb9092a839f12aa295907f41a78ddcf
Gerrit-Change-Number: 7754959
Gerrit-PatchSet: 5
Gerrit-Owner: Javier Garcia Visiedo <vis...@google.com>
Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
Gerrit-Reviewer: Javier Garcia Visiedo <vis...@google.com>
Gerrit-Attention: Javier Garcia Visiedo <vis...@google.com>
Gerrit-Comment-Date: Tue, 14 Apr 2026 08:47:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Javier Garcia Visiedo (Gerrit)

unread,
9:00 AM (3 hours ago) 9:00 AM
to Christian Dullweber, android-bu...@system.gserviceaccount.com, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, dullweb...@chromium.org, msrame...@chromium.org
Attention needed from Christian Dullweber

Javier Garcia Visiedo added 5 comments

File content/browser/browsing_data/browsing_data_remover_impl.cc
Line 556, Patchset 5 (Latest): const std::set<url::Origin>& origins = filter_builder->GetOrigins();
Christian Dullweber . resolved

The filter can also match registrable domains. I think we also need to call GetRegisterableDomains().

Javier Garcia Visiedo

Agree. I'll add handling for registrable domains as well.

Christian Dullweber . resolved

What do you think about moving this logic to a new BuildSiteFilter() function? That also allows us to more easily test the filtering logic

Javier Garcia Visiedo

Good idea! I'll refactor this.

Line 574, Patchset 5 (Latest): target_sites.contains(lock.agent_cluster_key().GetSite());
Christian Dullweber . resolved

Do we need to check AgentClusterKey::IsSiteKeyed() ?

Javier Garcia Visiedo

Yes, you are right. I will handle origin-keyed clusters.

Line 577, Patchset 5 (Latest): rph->GetRendererInterface()->PurgeResourceCache(base::DoNothing());
Christian Dullweber . resolved

We usually wait for deletions to be done so that this class can report when all operations have completed. You can call CreateTaskCompletionClosure() to get a callback that counts the remaining tasks

Javier Garcia Visiedo

Will do.

File content/browser/browsing_data/clear_site_data_handler_browsertest.cc
Line 435, Patchset 5 (Latest): int cache_request_count_ GUARDED_BY(cache_request_count_lock_) = 0;
Christian Dullweber . resolved

We could probably use a std::atomic<int> instead of int+lock?

Javier Garcia Visiedo

Agree, std::atomic<int> is cleaner and simpler here.

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Dullweber
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I74904e80bdb9092a839f12aa295907f41a78ddcf
    Gerrit-Change-Number: 7754959
    Gerrit-PatchSet: 5
    Gerrit-Owner: Javier Garcia Visiedo <vis...@google.com>
    Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
    Gerrit-Reviewer: Javier Garcia Visiedo <vis...@google.com>
    Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 12:59:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Christian Dullweber <dull...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages