| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // with older versions of WebKit. | 163 // with older versions of WebKit. |
| 164 void grantLoadLocalResources(); | 164 void grantLoadLocalResources(); |
| 165 | 165 |
| 166 // Explicitly grant the ability to access every other SecurityOrigin. | 166 // Explicitly grant the ability to access every other SecurityOrigin. |
| 167 // | 167 // |
| 168 // WARNING: This is an extremely powerful ability. Use with caution! | 168 // WARNING: This is an extremely powerful ability. Use with caution! |
| 169 void grantUniversalAccess(); | 169 void grantUniversalAccess(); |
| 170 bool isGrantedUniversalAccess() const { return m_universalAccess; } | 170 bool isGrantedUniversalAccess() const { return m_universalAccess; } |
| 171 | 171 |
| 172 bool canAccessDatabase() const { return !isUnique(); } | 172 bool canAccessDatabase() const { return !isUnique(); } |
| 173 bool canAccessLocalStorage() const { return !isUnique() && !hasSuborigin();
} | 173 bool canAccessLocalStorage() const { return !isUnique(); } |
| 174 bool canAccessSharedWorkers() const { return !isUnique(); } | 174 bool canAccessSharedWorkers() const { return !isUnique(); } |
| 175 bool canAccessServiceWorkers() const { return !isUnique() && !hasSuborigin()
; } | 175 bool canAccessServiceWorkers() const { return !isUnique() && !hasSuborigin()
; } |
| 176 bool canAccessCookies() const { return !isUnique(); } | 176 bool canAccessCookies() const { return !isUnique(); } |
| 177 bool canAccessPasswordManager() const { return !isUnique(); } | 177 bool canAccessPasswordManager() const { return !isUnique(); } |
| 178 bool canAccessFileSystem() const { return !isUnique(); } | 178 bool canAccessFileSystem() const { return !isUnique(); } |
| 179 bool canAccessCacheStorage() const { return !isUnique(); } | 179 bool canAccessCacheStorage() const { return !isUnique(); } |
| 180 | 180 |
| 181 // Technically, we should always allow access to sessionStorage, but we | 181 // Technically, we should always allow access to sessionStorage, but we |
| 182 // currently don't handle creating a sessionStorage area for unique | 182 // currently don't handle creating a sessionStorage area for unique |
| 183 // origins. | 183 // origins. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 bool m_universalAccess; | 283 bool m_universalAccess; |
| 284 bool m_domainWasSetInDOM; | 284 bool m_domainWasSetInDOM; |
| 285 bool m_canLoadLocalResources; | 285 bool m_canLoadLocalResources; |
| 286 bool m_blockLocalAccessFromLocalOrigin; | 286 bool m_blockLocalAccessFromLocalOrigin; |
| 287 bool m_isUniqueOriginPotentiallyTrustworthy; | 287 bool m_isUniqueOriginPotentiallyTrustworthy; |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 } // namespace blink | 290 } // namespace blink |
| 291 | 291 |
| 292 #endif // SecurityOrigin_h | 292 #endif // SecurityOrigin_h |
| OLD | NEW |