| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // with older versions of WebKit. | 168 // with older versions of WebKit. |
| 169 void grantLoadLocalResources(); | 169 void grantLoadLocalResources(); |
| 170 | 170 |
| 171 // Explicitly grant the ability to access every other SecurityOrigin. | 171 // Explicitly grant the ability to access every other SecurityOrigin. |
| 172 // | 172 // |
| 173 // WARNING: This is an extremely powerful ability. Use with caution! | 173 // WARNING: This is an extremely powerful ability. Use with caution! |
| 174 void grantUniversalAccess(); | 174 void grantUniversalAccess(); |
| 175 bool isGrantedUniversalAccess() const { return m_universalAccess; } | 175 bool isGrantedUniversalAccess() const { return m_universalAccess; } |
| 176 | 176 |
| 177 bool canAccessDatabase() const { return !isUnique(); } | 177 bool canAccessDatabase() const { return !isUnique(); } |
| 178 bool canAccessLocalStorage() const { return !isUnique() && !hasSuborigin(); } | 178 bool canAccessLocalStorage() const { return !isUnique(); } |
| 179 bool canAccessSharedWorkers() const { return !isUnique(); } | 179 bool canAccessSharedWorkers() const { return !isUnique(); } |
| 180 bool canAccessServiceWorkers() const { | 180 bool canAccessServiceWorkers() const { |
| 181 return !isUnique() && !hasSuborigin(); | 181 return !isUnique() && !hasSuborigin(); |
| 182 } | 182 } |
| 183 bool canAccessCookies() const { return !isUnique(); } | 183 bool canAccessCookies() const { return !isUnique(); } |
| 184 bool canAccessPasswordManager() const { return !isUnique(); } | 184 bool canAccessPasswordManager() const { return !isUnique(); } |
| 185 bool canAccessFileSystem() const { return !isUnique(); } | 185 bool canAccessFileSystem() const { return !isUnique(); } |
| 186 bool canAccessCacheStorage() const { return !isUnique(); } | 186 bool canAccessCacheStorage() const { return !isUnique(); } |
| 187 | 187 |
| 188 // Technically, we should always allow access to sessionStorage, but we | 188 // Technically, we should always allow access to sessionStorage, but we |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 bool m_universalAccess; | 297 bool m_universalAccess; |
| 298 bool m_domainWasSetInDOM; | 298 bool m_domainWasSetInDOM; |
| 299 bool m_canLoadLocalResources; | 299 bool m_canLoadLocalResources; |
| 300 bool m_blockLocalAccessFromLocalOrigin; | 300 bool m_blockLocalAccessFromLocalOrigin; |
| 301 bool m_isUniqueOriginPotentiallyTrustworthy; | 301 bool m_isUniqueOriginPotentiallyTrustworthy; |
| 302 }; | 302 }; |
| 303 | 303 |
| 304 } // namespace blink | 304 } // namespace blink |
| 305 | 305 |
| 306 #endif // SecurityOrigin_h | 306 #endif // SecurityOrigin_h |
| OLD | NEW |