| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 m_blockLocalAccessFromLocalOrigin = true; | 395 m_blockLocalAccessFromLocalOrigin = true; |
| 396 } | 396 } |
| 397 | 397 |
| 398 bool SecurityOrigin::isLocal() const | 398 bool SecurityOrigin::isLocal() const |
| 399 { | 399 { |
| 400 return SchemeRegistry::shouldTreatURLSchemeAsLocal(m_protocol); | 400 return SchemeRegistry::shouldTreatURLSchemeAsLocal(m_protocol); |
| 401 } | 401 } |
| 402 | 402 |
| 403 bool SecurityOrigin::isLocalhost() const | 403 bool SecurityOrigin::isLocalhost() const |
| 404 { | 404 { |
| 405 // TODO(mkwst): Update this to call into net::IsLocalhost. |
| 405 if (m_host == "localhost") | 406 if (m_host == "localhost") |
| 406 return true; | 407 return true; |
| 407 | 408 |
| 408 if (m_host == "[::1]") | 409 if (m_host == "[::1]") |
| 409 return true; | 410 return true; |
| 410 | 411 |
| 411 // Test if m_host matches 127.0.0.1/8 | 412 // Test if m_host matches 127.0.0.1/8 |
| 412 ASSERT(m_host.containsOnlyASCII()); | 413 ASSERT(m_host.containsOnlyASCII()); |
| 413 CString hostAscii = m_host.ascii(); | 414 CString hostAscii = m_host.ascii(); |
| 414 Vector<uint8_t, 4> ipNumber; | 415 Vector<uint8_t, 4> ipNumber; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 m_blockLocalAccessFromLocalOrigin = privilegeData->m_blockLocalAccessFromLoc
alOrigin; | 582 m_blockLocalAccessFromLocalOrigin = privilegeData->m_blockLocalAccessFromLoc
alOrigin; |
| 582 } | 583 } |
| 583 | 584 |
| 584 void SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOrigin
PotentiallyTrustworthy) | 585 void SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOrigin
PotentiallyTrustworthy) |
| 585 { | 586 { |
| 586 ASSERT(!isUniqueOriginPotentiallyTrustworthy || isUnique()); | 587 ASSERT(!isUniqueOriginPotentiallyTrustworthy || isUnique()); |
| 587 m_isUniqueOriginPotentiallyTrustworthy = isUniqueOriginPotentiallyTrustworth
y; | 588 m_isUniqueOriginPotentiallyTrustworthy = isUniqueOriginPotentiallyTrustworth
y; |
| 588 } | 589 } |
| 589 | 590 |
| 590 } // namespace blink | 591 } // namespace blink |
| OLD | NEW |