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

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

Issue 2127603002: Support internal hostnames (such as http://localhost) in domain-based deletion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More tests Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/browsing_data/registrable_domain_filter_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c7501afe75370f8afde146ab1b694624cea3bd08..c18c681c04b519fa764ad2a1f2dff6c295c1a859 100644
--- a/chrome/browser/browsing_data/registrable_domain_filter_builder.h
+++ b/chrome/browser/browsing_data/registrable_domain_filter_builder.h
@@ -29,6 +29,19 @@
//
// See net/base/registry_controlled_domains/registry_controlled_domain.h for
// more details on registrable domains and the current list of effective eTLDs.
+//
+// This filter also recognizes IP addresses and internal hostnames. Neither of
+// those have subdomains (or support domain cookies), and so the filter requires
+// the cookie (or other data type) source domain to be identical to the
+// domain (IP address or internal hostname) for it to be considered a match.
+//
+// Note that e.g. "subdomain.localhost" is NOT considered to be a subdomain
+// of the internal hostname "localhost". It is understood as a registrable
+// domain in the scope of the TLD "localhost" (from unknown registry),
+// and treated as any other registrable domain. For example,
+// "www.subdomain.localhost" will be matched by a filter containing
+// "subdomain.localhost". However, it is unrelated to "localhost", whose cookies
+// will never be visible on "*.localhost" or vice versa.
class RegistrableDomainFilterBuilder : public BrowsingDataFilterBuilder {
public:
// Constructs a filter with the given |mode| - whitelist or blacklist.
@@ -38,7 +51,8 @@ class RegistrableDomainFilterBuilder : public BrowsingDataFilterBuilder {
// Adds a registerable domain to the (white- or black-) list. This is expected
// to not include subdomains, so basically tld+1. This can also be an IP
- // address.
+ // address or an internal hostname.
+ //
// Refer to net/base/registry_controlled_domains/registry_controlled_domain.h
// for more details on registrable domains and the current list of effective.
// TLDs. We expect a string that would be returned by
« no previous file with comments | « no previous file | chrome/browser/browsing_data/registrable_domain_filter_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698