| OLD | NEW |
| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // - Grant loading of local resources. | 243 // - Grant loading of local resources. |
| 244 // - Use path-based file:// origins. | 244 // - Use path-based file:// origins. |
| 245 struct PrivilegeData { | 245 struct PrivilegeData { |
| 246 bool m_universalAccess; | 246 bool m_universalAccess; |
| 247 bool m_canLoadLocalResources; | 247 bool m_canLoadLocalResources; |
| 248 bool m_blockLocalAccessFromLocalOrigin; | 248 bool m_blockLocalAccessFromLocalOrigin; |
| 249 }; | 249 }; |
| 250 PassOwnPtr<PrivilegeData> createPrivilegeData() const; | 250 PassOwnPtr<PrivilegeData> createPrivilegeData() const; |
| 251 void transferPrivilegesFrom(PassOwnPtr<PrivilegeData>); | 251 void transferPrivilegesFrom(PassOwnPtr<PrivilegeData>); |
| 252 | 252 |
| 253 void setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOriginPotentiallyT
rustworthy); |
| 254 |
| 253 private: | 255 private: |
| 254 friend class SecurityOriginTest; | 256 friend class SecurityOriginTest; |
| 255 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, Suborigins); | 257 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, Suborigins); |
| 256 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsParsing); | 258 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsParsing); |
| 257 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsIsSameSchemeHostPortA
ndSuborigin); | 259 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsIsSameSchemeHostPortA
ndSuborigin); |
| 258 | 260 |
| 259 SecurityOrigin(); | 261 SecurityOrigin(); |
| 260 explicit SecurityOrigin(const KURL&); | 262 explicit SecurityOrigin(const KURL&); |
| 261 explicit SecurityOrigin(const SecurityOrigin*); | 263 explicit SecurityOrigin(const SecurityOrigin*); |
| 262 | 264 |
| 263 // FIXME: Rename this function to something more semantic. | 265 // FIXME: Rename this function to something more semantic. |
| 264 bool passesFileCheck(const SecurityOrigin*) const; | 266 bool passesFileCheck(const SecurityOrigin*) const; |
| 265 void buildRawString(StringBuilder&) const; | 267 void buildRawString(StringBuilder&) const; |
| 266 | 268 |
| 267 static bool deserializeSuboriginAndHost(const String&, String&, String&); | 269 static bool deserializeSuboriginAndHost(const String&, String&, String&); |
| 268 | 270 |
| 269 String m_protocol; | 271 String m_protocol; |
| 270 String m_host; | 272 String m_host; |
| 271 String m_domain; | 273 String m_domain; |
| 272 String m_suboriginName; | 274 String m_suboriginName; |
| 273 unsigned short m_port; | 275 unsigned short m_port; |
| 274 unsigned short m_effectivePort; | 276 unsigned short m_effectivePort; |
| 275 bool m_isUnique; | 277 bool m_isUnique; |
| 276 bool m_universalAccess; | 278 bool m_universalAccess; |
| 277 bool m_domainWasSetInDOM; | 279 bool m_domainWasSetInDOM; |
| 278 bool m_canLoadLocalResources; | 280 bool m_canLoadLocalResources; |
| 279 bool m_blockLocalAccessFromLocalOrigin; | 281 bool m_blockLocalAccessFromLocalOrigin; |
| 282 bool m_isUniqueOriginPotentiallyTrustworthy; |
| 280 }; | 283 }; |
| 281 | 284 |
| 282 } // namespace blink | 285 } // namespace blink |
| 283 | 286 |
| 284 #endif // SecurityOrigin_h | 287 #endif // SecurityOrigin_h |
| OLD | NEW |