| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 void SecurityOrigin::setDomainFromDOM(const String& newDomain) { | 204 void SecurityOrigin::setDomainFromDOM(const String& newDomain) { |
| 205 m_domainWasSetInDOM = true; | 205 m_domainWasSetInDOM = true; |
| 206 m_domain = newDomain; | 206 m_domain = newDomain; |
| 207 } | 207 } |
| 208 | 208 |
| 209 bool SecurityOrigin::isSecure(const KURL& url) { | 209 bool SecurityOrigin::isSecure(const KURL& url) { |
| 210 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol())) | 210 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol())) |
| 211 return true; | 211 return true; |
| 212 | 212 |
| 213 // URLs that wrap inner URLs are secure if those inner URLs are secure. | 213 // URLs that wrap inner URLs are secure if those inner URLs are secure. |
| 214 if (shouldUseInnerURL(url) && SchemeRegistry::shouldTreatURLSchemeAsSecure( | 214 if (shouldUseInnerURL(url) && |
| 215 extractInnerURL(url).protocol())) | 215 SchemeRegistry::shouldTreatURLSchemeAsSecure( |
| 216 extractInnerURL(url).protocol())) |
| 216 return true; | 217 return true; |
| 217 | 218 |
| 218 if (SecurityPolicy::isUrlWhiteListedTrustworthy(url)) | 219 if (SecurityPolicy::isUrlWhiteListedTrustworthy(url)) |
| 219 return true; | 220 return true; |
| 220 | 221 |
| 221 return false; | 222 return false; |
| 222 } | 223 } |
| 223 | 224 |
| 224 bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { | 225 bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { |
| 225 if (m_universalAccess) | 226 if (m_universalAccess) |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); | 619 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); |
| 619 } else { | 620 } else { |
| 620 *success = url::CanonicalizeHost(host.characters16(), | 621 *success = url::CanonicalizeHost(host.characters16(), |
| 621 url::Component(0, host.length()), | 622 url::Component(0, host.length()), |
| 622 &canonOutput, &outHost); | 623 &canonOutput, &outHost); |
| 623 } | 624 } |
| 624 return String::fromUTF8(canonOutput.data(), canonOutput.length()); | 625 return String::fromUTF8(canonOutput.data(), canonOutput.length()); |
| 625 } | 626 } |
| 626 | 627 |
| 627 } // namespace blink | 628 } // namespace blink |
| OLD | NEW |