| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 bool SecurityOrigin::isSecure(const KURL& url) { | 202 bool SecurityOrigin::isSecure(const KURL& url) { |
| 203 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol())) | 203 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol())) |
| 204 return true; | 204 return true; |
| 205 | 205 |
| 206 // URLs that wrap inner URLs are secure if those inner URLs are secure. | 206 // URLs that wrap inner URLs are secure if those inner URLs are secure. |
| 207 if (shouldUseInnerURL(url) && SchemeRegistry::shouldTreatURLSchemeAsSecure( | 207 if (shouldUseInnerURL(url) && SchemeRegistry::shouldTreatURLSchemeAsSecure( |
| 208 extractInnerURL(url).protocol())) | 208 extractInnerURL(url).protocol())) |
| 209 return true; | 209 return true; |
| 210 | 210 |
| 211 if (SecurityPolicy::isOriginWhiteListedTrustworthy( | 211 if (SecurityPolicy::isUrlWhiteListedTrustworthy(url)) |
| 212 *SecurityOrigin::create(url).get())) | |
| 213 return true; | 212 return true; |
| 214 | 213 |
| 215 return false; | 214 return false; |
| 216 } | 215 } |
| 217 | 216 |
| 218 bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { | 217 bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { |
| 219 if (m_universalAccess) | 218 if (m_universalAccess) |
| 220 return true; | 219 return true; |
| 221 | 220 |
| 222 if (this == other) | 221 if (this == other) |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 privilegeData->m_blockLocalAccessFromLocalOrigin; | 581 privilegeData->m_blockLocalAccessFromLocalOrigin; |
| 583 } | 582 } |
| 584 | 583 |
| 585 void SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy( | 584 void SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy( |
| 586 bool isUniqueOriginPotentiallyTrustworthy) { | 585 bool isUniqueOriginPotentiallyTrustworthy) { |
| 587 ASSERT(!isUniqueOriginPotentiallyTrustworthy || isUnique()); | 586 ASSERT(!isUniqueOriginPotentiallyTrustworthy || isUnique()); |
| 588 m_isUniqueOriginPotentiallyTrustworthy = isUniqueOriginPotentiallyTrustworthy; | 587 m_isUniqueOriginPotentiallyTrustworthy = isUniqueOriginPotentiallyTrustworthy; |
| 589 } | 588 } |
| 590 | 589 |
| 591 } // namespace blink | 590 } // namespace blink |
| OLD | NEW |