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

Unified Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp

Issue 2805683005: Merge SecurityOrigin::canAccessCheckSuborigins into canAccess (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
index 044219534e80407a7adc472fe774b3e97af1964e..f9ca9555faa3820f5e563ae988d0c1092644175e 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
@@ -231,6 +231,12 @@ bool SecurityOrigin::canAccess(const SecurityOrigin* other) const {
if (isUnique() || other->isUnique())
return false;
+ if (hasSuborigin() != other->hasSuborigin())
+ return false;
+
+ if (hasSuborigin() && suborigin()->name() != other->suborigin()->name())
+ return false;
+
// document.domain handling, as per
// https://html.spec.whatwg.org/multipage/browsers.html#dom-document-domain:
//
@@ -257,17 +263,6 @@ bool SecurityOrigin::canAccess(const SecurityOrigin* other) const {
return canAccess;
}
-bool SecurityOrigin::canAccessCheckSuborigins(
- const SecurityOrigin* other) const {
- if (hasSuborigin() != other->hasSuborigin())
- return false;
-
- if (hasSuborigin() && suborigin()->name() != other->suborigin()->name())
- return false;
-
- return canAccess(other);
-}
-
bool SecurityOrigin::passesFileCheck(const SecurityOrigin* other) const {
ASSERT(isLocal() && other->isLocal());

Powered by Google App Engine
This is Rietveld 408576698