Replace SiteInstance::IsSameWebSite() with a new non-static method.
Currently, SiteInstance::IsSameWebSite() is static and will need to be modified to support dynamic isolated origins. Those origins will apply only to future BrowsingInstances, meaning the answer to IsSameWebSite will depend on which frame/SiteInstance is asking this question. This CL replaces this method with a non-static SiteInstance::IsSameSiteWithURL method. This will ensure that the internal implementation will be able to provide sufficient context (i.e., BrowsingInstance info) in the future, without having to expose that context outside of content/. Note that the content-internal version of this call, SiteInstanceImpl::IsSameWebSite, stays as-is for now. The only two non-test uses of this were in NaCl code. They were checking whether the current SiteInstance's site URL is same-site with the URL of the NaCl file to be loaded, with both URLs expected to be extension URLs. There should be no behavior change in these, as the underlying implementation doesn't change. A few tests are also refactored to either avoid using IsSameWebSite entirely, or, for tests inside content/, to use the internal version of IsSameWebSite. Bug: 905513 Change-Id: Ia2957bb1ec7a16de8c3d18ef167149f1f5a08066 Reviewed-on: https://chromium-review.googlesource.com/c/1352856Reviewed-by:Avi Drissman <avi@chromium.org> Reviewed-by:
François Doray <fdoray@chromium.org> Reviewed-by:
Derek Schuff <dschuff@chromium.org> Reviewed-by:
Łukasz Anforowicz <lukasza@chromium.org> Commit-Queue: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#612495}
Showing
This diff is collapsed.
Please register or sign in to comment