Chromium Code Reviews| Index: Source/platform/weborigin/SecurityOrigin.h |
| diff --git a/Source/platform/weborigin/SecurityOrigin.h b/Source/platform/weborigin/SecurityOrigin.h |
| index 525b25d59ead234edb1cd46663a30ed6443546e2..f2d77c19a8e4d25f466ab850dde834725b1599ff 100644 |
| --- a/Source/platform/weborigin/SecurityOrigin.h |
| +++ b/Source/platform/weborigin/SecurityOrigin.h |
| @@ -143,12 +143,12 @@ public: |
| // WARNING: This is an extremely powerful ability. Use with caution! |
| void grantUniversalAccess(); |
| - bool canAccessDatabase() const { return !isUnique(); }; |
| - bool canAccessLocalStorage() const { return !isUnique(); }; |
| - bool canAccessSharedWorkers() const { return !isUnique(); } |
| - bool canAccessCookies() const { return !isUnique(); } |
| - bool canAccessPasswordManager() const { return !isUnique(); } |
| - bool canAccessFileSystem() const { return !isUnique(); } |
| + bool canAccessDatabase() const { return !isUnique() && !hasSuborigin(); }; |
|
Mike West
2014/10/23 12:59:20
Why are we blocking access to these for suborigins
jww
2015/03/20 22:50:03
The proposal/initial spec calls for these sensitiv
|
| + bool canAccessLocalStorage() const { return !isUnique() && !hasSuborigin(); }; |
| + bool canAccessSharedWorkers() const { return !isUnique() && !hasSuborigin(); } |
| + bool canAccessCookies() const { return !isUnique() && !hasSuborigin(); } |
| + bool canAccessPasswordManager() const { return !isUnique() && !hasSuborigin(); } |
| + bool canAccessFileSystem() const { return !isUnique() && !hasSuborigin(); } |
| Policy canShowNotifications() const; |
| // Technically, we should always allow access to sessionStorage, but we |
| @@ -172,6 +172,10 @@ public: |
| // addition, the SandboxOrigin flag is inherited by iframes. |
| bool isUnique() const { return m_isUnique; } |
| + void addSuborigin(const String&); |
| + bool hasSuborigin() const { return !m_suboriginName.isNull(); } |
| + const String& suboriginName() const { return m_suboriginName; } |
| + |
| // Marks a file:// origin as being in a domain defined by its path. |
| // FIXME 81578: The naming of this is confusing. Files with restricted access to other local files |
| // still can have other privileges that can be remembered, thereby not making them unique. |
| @@ -227,6 +231,7 @@ private: |
| String m_host; |
| String m_domain; |
| String m_filePath; |
| + String m_suboriginName; |
| unsigned short m_port; |
| bool m_isUnique; |
| bool m_universalAccess; |