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

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

Issue 2005783005: Re-enable storage for Suborigins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Rebase on ToT Created 4 years, 2 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 | « third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php ('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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698