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

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: fix 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
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/SecurityOrigin.cpp
diff --git a/Source/platform/weborigin/SecurityOrigin.cpp b/Source/platform/weborigin/SecurityOrigin.cpp
index d971d8bf965743227ffc4b41a6df2d6cef541c4c..e05c71300b7ef71df3f37ebdee102dd6ee748844 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)
@@ -275,10 +271,7 @@ bool SecurityOrigin::passesFileCheck(const SecurityOrigin* other) const
{
ASSERT(isLocal() && other->isLocal());
- if (!m_enforceFilePathSeparation && !other->m_enforceFilePathSeparation)
- return true;
-
- return (m_filePath == other->m_filePath);
+ return !m_enforceFilePathSeparation && !other->m_enforceFilePathSeparation;
dcheng 2015/06/01 21:08:53 I think we should rename m_enforceFilePathSeparati
TheJH 2015/06/02 11:59:19 What would be a good name? m_treatFileAsUniqueOrig
}
bool SecurityOrigin::canRequest(const KURL& url) const
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698