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

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

Issue 417153004: Treat reserved IP addresses as mixed content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 bool canAccessSessionStorage() const { return !isUnique(); } 157 bool canAccessSessionStorage() const { return !isUnique(); }
158 158
159 // The local SecurityOrigin is the most privileged SecurityOrigin. 159 // The local SecurityOrigin is the most privileged SecurityOrigin.
160 // The local SecurityOrigin can script any document, navigate to local 160 // The local SecurityOrigin can script any document, navigate to local
161 // resources, and can set arbitrary headers on XMLHttpRequests. 161 // resources, and can set arbitrary headers on XMLHttpRequests.
162 bool isLocal() const; 162 bool isLocal() const;
163 163
164 // Returns true if the host is one of 127.0.0.1/8, ::1/128, or "localhost". 164 // Returns true if the host is one of 127.0.0.1/8, ::1/128, or "localhost".
165 bool isLocalhost() const; 165 bool isLocalhost() const;
166 166
167 // Returns true if the host is reserved, as per IANA's IPv4 and IPv6 registr ies:
168 // http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xht ml and
169 // http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xht ml
170 bool isReservedIPAddress() const;
171
167 // The origin is a globally unique identifier assigned when the Document is 172 // The origin is a globally unique identifier assigned when the Document is
168 // created. http://www.whatwg.org/specs/web-apps/current-work/#sandboxOrigin 173 // created. http://www.whatwg.org/specs/web-apps/current-work/#sandboxOrigin
169 // 174 //
170 // There's a subtle difference between a unique origin and an origin that 175 // There's a subtle difference between a unique origin and an origin that
171 // has the SandboxOrigin flag set. The latter implies the former, and, in 176 // has the SandboxOrigin flag set. The latter implies the former, and, in
172 // addition, the SandboxOrigin flag is inherited by iframes. 177 // addition, the SandboxOrigin flag is inherited by iframes.
173 bool isUnique() const { return m_isUnique; } 178 bool isUnique() const { return m_isUnique; }
174 179
175 // Marks a file:// origin as being in a domain defined by its path. 180 // Marks a file:// origin as being in a domain defined by its path.
176 // FIXME 81578: The naming of this is confusing. Files with restricted acces s to other local files 181 // FIXME 81578: The naming of this is confusing. Files with restricted acces s to other local files
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 bool m_universalAccess; 226 bool m_universalAccess;
222 bool m_domainWasSetInDOM; 227 bool m_domainWasSetInDOM;
223 bool m_canLoadLocalResources; 228 bool m_canLoadLocalResources;
224 bool m_enforceFilePathSeparation; 229 bool m_enforceFilePathSeparation;
225 bool m_needsDatabaseIdentifierQuirkForFiles; 230 bool m_needsDatabaseIdentifierQuirkForFiles;
226 }; 231 };
227 232
228 } // namespace blink 233 } // namespace blink
229 234
230 #endif // SecurityOrigin_h 235 #endif // SecurityOrigin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698