| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ASSERT(origin->isUnique()); | 196 ASSERT(origin->isUnique()); |
| 197 return origin.release(); | 197 return origin.release(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 PassRefPtr<SecurityOrigin> SecurityOrigin::isolatedCopy() const { | 200 PassRefPtr<SecurityOrigin> SecurityOrigin::isolatedCopy() const { |
| 201 return adoptRef(new SecurityOrigin(this)); | 201 return adoptRef(new SecurityOrigin(this)); |
| 202 } | 202 } |
| 203 | 203 |
| 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.lower(); | 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) && SchemeRegistry::shouldTreatURLSchemeAsSecure( |
| 215 extractInnerURL(url).protocol())) | 215 extractInnerURL(url).protocol())) |
| 216 return true; | 216 return true; |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); | 618 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); |
| 619 } else { | 619 } else { |
| 620 *success = url::CanonicalizeHost(host.characters16(), | 620 *success = url::CanonicalizeHost(host.characters16(), |
| 621 url::Component(0, host.length()), | 621 url::Component(0, host.length()), |
| 622 &canonOutput, &outHost); | 622 &canonOutput, &outHost); |
| 623 } | 623 } |
| 624 return String::fromUTF8(canonOutput.data(), canonOutput.length()); | 624 return String::fromUTF8(canonOutput.data(), canonOutput.length()); |
| 625 } | 625 } |
| 626 | 626 |
| 627 } // namespace blink | 627 } // namespace blink |
| OLD | NEW |