Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: chrome/browser/browsing_data/registrable_domain_filter_builder.h

Issue 2248403002: Implement origin-based deletion of plugin data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/registrable_domain_filter_builder.h
diff --git a/chrome/browser/browsing_data/registrable_domain_filter_builder.h b/chrome/browser/browsing_data/registrable_domain_filter_builder.h
index 3afbb631cf947e266ecffde805f12fd6d090e826..00bcafa16fc7de3833a255503b5f86e21f4a7579 100644
--- a/chrome/browser/browsing_data/registrable_domain_filter_builder.h
+++ b/chrome/browser/browsing_data/registrable_domain_filter_builder.h
@@ -85,6 +85,11 @@ class RegistrableDomainFilterBuilder : public BrowsingDataFilterBuilder {
base::Callback<bool(const std::string& cookie)>
BuildChannelIDFilter() const override;
+ // Builds a filter that matches plugins whose |site|s are registrable domains
+ // that are in the whitelist, or are not in the blacklist.
+ base::Callback<bool(const std::string& site)>
+ BuildPluginFilter() const override;
+
// Used for testing.
bool operator==(const RegistrableDomainFilterBuilder& other) const;
@@ -123,6 +128,14 @@ class RegistrableDomainFilterBuilder : public BrowsingDataFilterBuilder {
Mode mode,
const std::string& channel_id_server_id);
+ // True if none of the supplied domains matches this plugin's |site| and we're
+ // a blacklist, or one of them does and we're a whitelist. The whitelist or
+ // blacklist is represented by |domains_and_ips| and |mode|.
+ static bool MatchesPluginSiteForRegisterableDomainsAndIPs(
+ std::set<std::string>* domains_and_ips,
+ Mode mode,
+ const std::string& site);
+
// The list of domains and whether they should be interpreted as a whitelist
// or blacklist.
std::set<std::string> domain_list_;

Powered by Google App Engine
This is Rietveld 408576698