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

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

Issue 1140203002: make file: an effectively unique origin (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added test Created 5 years, 7 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: Source/platform/weborigin/SecurityOrigin.cpp
diff --git a/Source/platform/weborigin/SecurityOrigin.cpp b/Source/platform/weborigin/SecurityOrigin.cpp
index d971d8bf965743227ffc4b41a6df2d6cef541c4c..7ef2ba1daf033d26b40d14a99c81d8d692968ce7 100644
--- a/Source/platform/weborigin/SecurityOrigin.cpp
+++ b/Source/platform/weborigin/SecurityOrigin.cpp
@@ -134,9 +134,6 @@ SecurityOrigin::SecurityOrigin(const KURL& url)
// By default, only local SecurityOrigins can load local resources.
m_canLoadLocalResources = isLocal();
-
- if (m_canLoadLocalResources)
- m_filePath = url.path(); // In case enforceFilePathSeparation() is called.
}
SecurityOrigin::SecurityOrigin()
@@ -157,7 +154,6 @@ SecurityOrigin::SecurityOrigin(const SecurityOrigin* other)
: m_protocol(other->m_protocol.isolatedCopy())
, m_host(other->m_host.isolatedCopy())
, m_domain(other->m_domain.isolatedCopy())
- , m_filePath(other->m_filePath.isolatedCopy())
, m_port(other->m_port)
, m_isUnique(other->m_isUnique)
, m_universalAccess(other->m_universalAccess)
@@ -278,7 +274,7 @@ bool SecurityOrigin::passesFileCheck(const SecurityOrigin* other) const
if (!m_enforceFilePathSeparation && !other->m_enforceFilePathSeparation)
return true;
- return (m_filePath == other->m_filePath);
+ return false;
Mike West 2015/05/17 08:40:48 Nit: You can now simplify this to `return !m_enfor
}
bool SecurityOrigin::canRequest(const KURL& url) const

Powered by Google App Engine
This is Rietveld 408576698