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

Issue 2891443002: Keep subdomains of an isolated origin in the isolated origin's SiteInstance. (Closed)

Created:
3 years, 7 months ago by alexmos
Modified:
3 years, 5 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, ajwong+watch_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Keep subdomains of an isolated origin in the isolated origin's SiteInstance. Previously, if bar.foo.com was an isolated origin, subdomains like subdomain.bar.foo.com would end up in a different SiteInstance (using "foo.com" for its site URL) than the isolated origin, which was confusing/undesirable. There was also confusion with subdomains if an etld+1 (e.g., isolated.com) was marked as an isolated origin: we would try to assign a different SiteInstance to foo.isolated.com than isolated.com, yet the site URL would still resolve to "isolated.com". This CL changes this behavior to keep subdomains in the isolated origin's SiteInstance. It also adds conflict resolution, which allows adding multiple isolated origins with a common domain (e.g., c.b.a.com and a.com), where the most specific isolated origin is used when picking the SiteInstance site URL for a particular URL (e.g., b.a.com would use a.com, but d.c.b.a.com would use c.b.a.com). For more discussion about this, see the isolated origin design doc: https://goo.gl/99ynqK BUG=713444 Review-Url: https://codereview.chromium.org/2891443002 Cr-Commit-Position: refs/heads/master@{#483881} Committed: https://chromium.googlesource.com/chromium/src/+/4bc26323b196f3b8957e85fc1eb48c08456fc84d

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Most specific origin matching; tests; bug fixes #

Patch Set 4 : Test fixes #

Patch Set 5 : Various cleanup #

Patch Set 6 : More cleanup #

Total comments: 20

Patch Set 7 : Charlie's comments #

Total comments: 3

Patch Set 8 : Rebase #

Total comments: 6

Patch Set 9 : Addressing Nick's comments #

Total comments: 4

Patch Set 10 : Reorder checks in SiteInstance::IsSameWebSite #

Unified diffs Side-by-side diffs Delta from patch set Stats (+447 lines, -26 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/child_process_security_policy_impl.h View 1 2 3 4 5 6 7 2 chunks +47 lines, -8 lines 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +36 lines, -5 lines 0 comments Download
M content/browser/isolated_origin_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
A content/browser/isolated_origin_util.h View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
A content/browser/isolated_origin_util.cc View 1 2 3 4 5 6 7 8 1 chunk +67 lines, -0 lines 0 comments Download
M content/browser/site_instance_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +30 lines, -11 lines 0 comments Download
M content/browser/site_instance_impl_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +192 lines, -2 lines 0 comments Download

Messages

Total messages: 52 (40 generated)
alexmos
Charlie, can you please take a look when you get a chance? No rush on ...
3 years, 6 months ago (2017-06-21 17:31:53 UTC) #22
Charlie Reis
Nice! Basically looks good with a few clarifications. Nick, can you give a sanity check ...
3 years, 5 months ago (2017-06-28 01:02:17 UTC) #26
alexmos
Thanks for reviewing! https://codereview.chromium.org/2891443002/diff/100001/content/browser/child_process_security_policy_impl.h File content/browser/child_process_security_policy_impl.h (right): https://codereview.chromium.org/2891443002/diff/100001/content/browser/child_process_security_policy_impl.h#newcode197 content/browser/child_process_security_policy_impl.h:197: // origin's site. I.e., if https://isolated.foo.com ...
3 years, 5 months ago (2017-06-28 18:29:52 UTC) #29
Charlie Reis
Thanks. LGTM with one question about whether we need the util file. https://codereview.chromium.org/2891443002/diff/100001/content/browser/child_process_security_policy_impl.h File content/browser/child_process_security_policy_impl.h ...
3 years, 5 months ago (2017-06-28 20:56:57 UTC) #32
ncarter (slow)
https://codereview.chromium.org/2891443002/diff/140001/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/2891443002/diff/140001/content/browser/child_process_security_policy_impl.cc#newcode1097 content/browser/child_process_security_policy_impl.cc:1097: << "Cannot register a unique origin as an isolated ...
3 years, 5 months ago (2017-06-28 20:59:19 UTC) #33
ncarter (slow)
https://codereview.chromium.org/2891443002/diff/100001/content/browser/isolated_origin_util.cc File content/browser/isolated_origin_util.cc (right): https://codereview.chromium.org/2891443002/diff/100001/content/browser/isolated_origin_util.cc#newcode24 content/browser/isolated_origin_util.cc:24: return origin.GetURL().DomainIs(isolated_origin.host()); On 2017/06/28 20:56:57, Charlie Reis (slow) wrote: ...
3 years, 5 months ago (2017-06-28 21:07:49 UTC) #34
alexmos
Thanks for the reviews! Please take another look. Charlie: replied about the util file. Nick: ...
3 years, 5 months ago (2017-06-29 21:54:02 UTC) #37
Charlie Reis
Thanks-- one reply below, and I'll let Nick handle the other parts. https://codereview.chromium.org/2891443002/diff/120001/content/browser/isolated_origin_util.h File content/browser/isolated_origin_util.h ...
3 years, 5 months ago (2017-06-29 23:27:23 UTC) #40
ncarter (slow)
lgtm https://codereview.chromium.org/2891443002/diff/160001/content/browser/isolated_origin_util.cc File content/browser/isolated_origin_util.cc (right): https://codereview.chromium.org/2891443002/diff/160001/content/browser/isolated_origin_util.cc#newcode51 content/browser/isolated_origin_util.cc:51: net::registry_controlled_domains::HostHasRegistryControlledDomain( This variant will redo the canonicalization internally, ...
3 years, 5 months ago (2017-06-30 22:00:56 UTC) #41
alexmos
https://codereview.chromium.org/2891443002/diff/160001/content/browser/isolated_origin_util.cc File content/browser/isolated_origin_util.cc (right): https://codereview.chromium.org/2891443002/diff/160001/content/browser/isolated_origin_util.cc#newcode51 content/browser/isolated_origin_util.cc:51: net::registry_controlled_domains::HostHasRegistryControlledDomain( On 2017/06/30 22:00:56, ncarter (slow) wrote: > This ...
3 years, 5 months ago (2017-06-30 23:30:03 UTC) #44
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/2891443002/180001
3 years, 5 months ago (2017-07-01 00:51:29 UTC) #49
commit-bot: I haz the power
3 years, 5 months ago (2017-07-01 00:57:38 UTC) #52
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/4bc26323b196f3b8957e85fc1eb4...

Powered by Google App Engine
This is Rietveld 408576698