Thank you for fixing this! I have a few small questions
const std::set<url::Origin>& origins = filter_builder->GetOrigins();The filter can also match registrable domains. I think we also need to call GetRegisterableDomains().
}What do you think about moving this logic to a new BuildSiteFilter() function? That also allows us to more easily test the filtering logic
target_sites.contains(lock.agent_cluster_key().GetSite());Do we need to check AgentClusterKey::IsSiteKeyed() ?
rph->GetRendererInterface()->PurgeResourceCache(base::DoNothing());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
int cache_request_count_ GUARDED_BY(cache_request_count_lock_) = 0;We could probably use a std::atomic<int> instead of int+lock?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const std::set<url::Origin>& origins = filter_builder->GetOrigins();The filter can also match registrable domains. I think we also need to call GetRegisterableDomains().
Agree. I'll add handling for registrable domains as well.
What do you think about moving this logic to a new BuildSiteFilter() function? That also allows us to more easily test the filtering logic
Good idea! I'll refactor this.
target_sites.contains(lock.agent_cluster_key().GetSite());Do we need to check AgentClusterKey::IsSiteKeyed() ?
Yes, you are right. I will handle origin-keyed clusters.
rph->GetRendererInterface()->PurgeResourceCache(base::DoNothing());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
Will do.
int cache_request_count_ GUARDED_BY(cache_request_count_lock_) = 0;We could probably use a std::atomic<int> instead of int+lock?
Agree, std::atomic<int> is cleaner and simpler here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |