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

Issue 2127603002: Support internal hostnames (such as http://localhost) in domain-based deletion (Closed)

Created:
4 years, 5 months ago by msramek
Modified:
4 years, 5 months ago
Reviewers:
Mike West, dmurph
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support internal hostnames (such as http://localhost) in domain-based deletion Until now, RegistrableDomainFilterBuilder allowed the filters to contain only eTLD+1 and IP addresses. This excluded internal hostnames, such as http://localhost. Since domain scoped cookies can not be set on domains that do not contain at least one dot (two dots according to RFC 2109, but the leading dot is automatically prepended), cookies for "localhost" will never be visible from other hosts. In particular, they will not be visible from "subdomain.localhost", therefore it is sufficient if the filter requires exact hostname match in these cases. Note that "subdomain.localhost" allows domain cookies, and these will be visible from "third-level-domain.subdomain.localhost". GetDomainAndRegistry() treats "subdomain.localhost" as an eTLD+1 from an unknown registry, and RegistrableDomainFilterBuilder in this case works as usual. BUG=589586 Committed: https://crrev.com/dba4dbf970d73e637514fb1b3a7b464f632d2222 Cr-Commit-Position: refs/heads/master@{#404128}

Patch Set 1 : Done, sending to review. #

Total comments: 4

Patch Set 2 : More tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -24 lines) Patch
M chrome/browser/browsing_data/registrable_domain_filter_builder.h View 2 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/browsing_data/registrable_domain_filter_builder.cc View 5 chunks +33 lines, -14 lines 0 comments Download
M chrome/browser/browsing_data/registrable_domain_filter_builder_unittest.cc View 1 15 chunks +105 lines, -9 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
msramek
Hi Mike and Dan, please have a look and let me know if this makes ...
4 years, 5 months ago (2016-07-05 14:28:24 UTC) #3
Mike West
https://codereview.chromium.org/2127603002/diff/20001/chrome/browser/browsing_data/registrable_domain_filter_builder.h File chrome/browser/browsing_data/registrable_domain_filter_builder.h (right): https://codereview.chromium.org/2127603002/diff/20001/chrome/browser/browsing_data/registrable_domain_filter_builder.h#newcode44 chrome/browser/browsing_data/registrable_domain_filter_builder.h:44: // will never be visible on "*.localhost" or vice ...
4 years, 5 months ago (2016-07-06 06:48:00 UTC) #4
msramek
https://codereview.chromium.org/2127603002/diff/20001/chrome/browser/browsing_data/registrable_domain_filter_builder.h File chrome/browser/browsing_data/registrable_domain_filter_builder.h (right): https://codereview.chromium.org/2127603002/diff/20001/chrome/browser/browsing_data/registrable_domain_filter_builder.h#newcode44 chrome/browser/browsing_data/registrable_domain_filter_builder.h:44: // will never be visible on "*.localhost" or vice ...
4 years, 5 months ago (2016-07-06 08:58:29 UTC) #5
Mike West
Thanks for the explanation and tests. LGTM with a test nit. https://codereview.chromium.org/2127603002/diff/20001/chrome/browser/browsing_data/registrable_domain_filter_builder_unittest.cc File chrome/browser/browsing_data/registrable_domain_filter_builder_unittest.cc (right): ...
4 years, 5 months ago (2016-07-06 09:30:09 UTC) #6
dmurph
This lgtm. I wish I noticed that the blacklist/whitelist differences w/ testcases was a simple ...
4 years, 5 months ago (2016-07-06 18:46:21 UTC) #7
msramek
Thanks! I made sure to keep the pairs of test symmetrical, so I can simplify ...
4 years, 5 months ago (2016-07-07 10:46:29 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2127603002/60001
4 years, 5 months ago (2016-07-07 10:46:50 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:60001)
4 years, 5 months ago (2016-07-07 11:19:07 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-07 11:19:09 UTC) #14
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 11:22:11 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/dba4dbf970d73e637514fb1b3a7b464f632d2222
Cr-Commit-Position: refs/heads/master@{#404128}

Powered by Google App Engine
This is Rietveld 408576698