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

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: Update to new serialization 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
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // with older versions of WebKit. 164 // with older versions of WebKit.
165 void grantLoadLocalResources(); 165 void grantLoadLocalResources();
166 166
167 // Explicitly grant the ability to access every other SecurityOrigin. 167 // Explicitly grant the ability to access every other SecurityOrigin.
168 // 168 //
169 // WARNING: This is an extremely powerful ability. Use with caution! 169 // WARNING: This is an extremely powerful ability. Use with caution!
170 void grantUniversalAccess(); 170 void grantUniversalAccess();
171 bool isGrantedUniversalAccess() const { return m_universalAccess; } 171 bool isGrantedUniversalAccess() const { return m_universalAccess; }
172 172
173 bool canAccessDatabase() const { return !isUnique(); } 173 bool canAccessDatabase() const { return !isUnique(); }
174 bool canAccessLocalStorage() const { return !isUnique() && !hasSuborigin(); } 174 bool canAccessLocalStorage() const { return !isUnique(); }
175 bool canAccessSharedWorkers() const { return !isUnique(); } 175 bool canAccessSharedWorkers() const { return !isUnique(); }
176 bool canAccessServiceWorkers() const { return !isUnique() && !hasSuborigin() ; } 176 bool canAccessServiceWorkers() const { return !isUnique() && !hasSuborigin() ; }
177 bool canAccessCookies() const { return !isUnique(); } 177 bool canAccessCookies() const { return !isUnique(); }
178 bool canAccessPasswordManager() const { return !isUnique(); } 178 bool canAccessPasswordManager() const { return !isUnique(); }
179 bool canAccessFileSystem() const { return !isUnique(); } 179 bool canAccessFileSystem() const { return !isUnique(); }
180 bool canAccessCacheStorage() const { return !isUnique(); } 180 bool canAccessCacheStorage() const { return !isUnique(); }
181 181
182 // Technically, we should always allow access to sessionStorage, but we 182 // Technically, we should always allow access to sessionStorage, but we
183 // currently don't handle creating a sessionStorage area for unique 183 // currently don't handle creating a sessionStorage area for unique
184 // origins. 184 // origins.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 bool m_universalAccess; 284 bool m_universalAccess;
285 bool m_domainWasSetInDOM; 285 bool m_domainWasSetInDOM;
286 bool m_canLoadLocalResources; 286 bool m_canLoadLocalResources;
287 bool m_blockLocalAccessFromLocalOrigin; 287 bool m_blockLocalAccessFromLocalOrigin;
288 bool m_isUniqueOriginPotentiallyTrustworthy; 288 bool m_isUniqueOriginPotentiallyTrustworthy;
289 }; 289 };
290 290
291 } // namespace blink 291 } // namespace blink
292 292
293 #endif // SecurityOrigin_h 293 #endif // SecurityOrigin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698