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

Side by Side Diff: Source/platform/weborigin/SecurityOrigin.h

Issue 1199183002: Throw a SecurityError when navigator.serviceWorker is accessed in a sandboxed iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use ASSERT_NO_EXCEPTION Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « Source/modules/serviceworkers/NavigatorServiceWorker.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void grantLoadLocalResources(); 153 void grantLoadLocalResources();
154 154
155 // Explicitly grant the ability to access every other SecurityOrigin. 155 // Explicitly grant the ability to access every other SecurityOrigin.
156 // 156 //
157 // WARNING: This is an extremely powerful ability. Use with caution! 157 // WARNING: This is an extremely powerful ability. Use with caution!
158 void grantUniversalAccess(); 158 void grantUniversalAccess();
159 159
160 bool canAccessDatabase() const { return !isUnique(); }; 160 bool canAccessDatabase() const { return !isUnique(); };
161 bool canAccessLocalStorage() const { return !isUnique(); }; 161 bool canAccessLocalStorage() const { return !isUnique(); };
162 bool canAccessSharedWorkers() const { return !isUnique(); } 162 bool canAccessSharedWorkers() const { return !isUnique(); }
163 bool canAccessServiceWorkers() const { return !isUnique(); }
163 bool canAccessCookies() const { return !isUnique(); } 164 bool canAccessCookies() const { return !isUnique(); }
164 bool canAccessPasswordManager() const { return !isUnique(); } 165 bool canAccessPasswordManager() const { return !isUnique(); }
165 bool canAccessFileSystem() const { return !isUnique(); } 166 bool canAccessFileSystem() const { return !isUnique(); }
166 bool canAccessCacheStorage() const { return !isUnique(); }; 167 bool canAccessCacheStorage() const { return !isUnique(); };
167 Policy canShowNotifications() const; 168 Policy canShowNotifications() const;
168 169
169 // Technically, we should always allow access to sessionStorage, but we 170 // Technically, we should always allow access to sessionStorage, but we
170 // currently don't handle creating a sessionStorage area for unique 171 // currently don't handle creating a sessionStorage area for unique
171 // origins. 172 // origins.
172 bool canAccessSessionStorage() const { return !isUnique(); } 173 bool canAccessSessionStorage() const { return !isUnique(); }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 bool m_universalAccess; 266 bool m_universalAccess;
266 bool m_domainWasSetInDOM; 267 bool m_domainWasSetInDOM;
267 bool m_canLoadLocalResources; 268 bool m_canLoadLocalResources;
268 bool m_enforceFilePathSeparation; 269 bool m_enforceFilePathSeparation;
269 bool m_needsDatabaseIdentifierQuirkForFiles; 270 bool m_needsDatabaseIdentifierQuirkForFiles;
270 }; 271 };
271 272
272 } // namespace blink 273 } // namespace blink
273 274
274 #endif // SecurityOrigin_h 275 #endif // SecurityOrigin_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/NavigatorServiceWorker.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698