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

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

Issue 594803002: Transfer SecurityOrigin overrides to Workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename transferPrivileges() to transferPrivilegesFrom() over security origins Created 6 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 | Annotate | Revision Log
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 AtomicString toRawAtomicString() const; 196 AtomicString toRawAtomicString() const;
197 197
198 // This method checks for equality, ignoring the value of document.domain 198 // This method checks for equality, ignoring the value of document.domain
199 // (and whether it was set) but considering the host. It is used for postMes sage. 199 // (and whether it was set) but considering the host. It is used for postMes sage.
200 bool isSameSchemeHostPort(const SecurityOrigin*) const; 200 bool isSameSchemeHostPort(const SecurityOrigin*) const;
201 201
202 bool needsDatabaseIdentifierQuirkForFiles() const { return m_needsDatabaseId entifierQuirkForFiles; } 202 bool needsDatabaseIdentifierQuirkForFiles() const { return m_needsDatabaseId entifierQuirkForFiles; }
203 203
204 static const String& urlWithUniqueSecurityOrigin(); 204 static const String& urlWithUniqueSecurityOrigin();
205 205
206 // Transfer origin privileges from another security origin.
207 // The following privileges are currently copied over:
208 //
209 // - Grant universal access.
210 // - Grant loading of local resources.
211 // - Use path-based file:// origins.
212 //
213 // Note: It is dangerous to change the privileges of an origin
214 // at any other time than during initialization.
215 void transferPrivilegesFrom(const SecurityOrigin&);
216
206 private: 217 private:
207 SecurityOrigin(); 218 SecurityOrigin();
208 explicit SecurityOrigin(const KURL&); 219 explicit SecurityOrigin(const KURL&);
209 explicit SecurityOrigin(const SecurityOrigin*); 220 explicit SecurityOrigin(const SecurityOrigin*);
210 221
211 // FIXME: Rename this function to something more semantic. 222 // FIXME: Rename this function to something more semantic.
212 bool passesFileCheck(const SecurityOrigin*) const; 223 bool passesFileCheck(const SecurityOrigin*) const;
213 void buildRawString(StringBuilder&) const; 224 void buildRawString(StringBuilder&) const;
214 225
215 String m_protocol; 226 String m_protocol;
216 String m_host; 227 String m_host;
217 String m_domain; 228 String m_domain;
218 String m_filePath; 229 String m_filePath;
219 unsigned short m_port; 230 unsigned short m_port;
220 bool m_isUnique; 231 bool m_isUnique;
221 bool m_universalAccess; 232 bool m_universalAccess;
222 bool m_domainWasSetInDOM; 233 bool m_domainWasSetInDOM;
223 bool m_canLoadLocalResources; 234 bool m_canLoadLocalResources;
224 bool m_enforceFilePathSeparation; 235 bool m_enforceFilePathSeparation;
225 bool m_needsDatabaseIdentifierQuirkForFiles; 236 bool m_needsDatabaseIdentifierQuirkForFiles;
226 }; 237 };
227 238
228 } // namespace blink 239 } // namespace blink
229 240
230 #endif // SecurityOrigin_h 241 #endif // SecurityOrigin_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp ('k') | Source/platform/weborigin/SecurityOrigin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698