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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 573 |
574 const KURL& SecurityOrigin::urlWithUniqueSecurityOrigin() { | 574 const KURL& SecurityOrigin::urlWithUniqueSecurityOrigin() { |
575 ASSERT(isMainThread()); | 575 ASSERT(isMainThread()); |
576 DEFINE_STATIC_LOCAL(const KURL, uniqueSecurityOriginURL, | 576 DEFINE_STATIC_LOCAL(const KURL, uniqueSecurityOriginURL, |
577 (ParsedURLString, "data:,")); | 577 (ParsedURLString, "data:,")); |
578 return uniqueSecurityOriginURL; | 578 return uniqueSecurityOriginURL; |
579 } | 579 } |
580 | 580 |
581 std::unique_ptr<SecurityOrigin::PrivilegeData> | 581 std::unique_ptr<SecurityOrigin::PrivilegeData> |
582 SecurityOrigin::createPrivilegeData() const { | 582 SecurityOrigin::createPrivilegeData() const { |
583 std::unique_ptr<PrivilegeData> privilegeData = wrapUnique(new PrivilegeData); | 583 std::unique_ptr<PrivilegeData> privilegeData = |
| 584 WTF::wrapUnique(new PrivilegeData); |
584 privilegeData->m_universalAccess = m_universalAccess; | 585 privilegeData->m_universalAccess = m_universalAccess; |
585 privilegeData->m_canLoadLocalResources = m_canLoadLocalResources; | 586 privilegeData->m_canLoadLocalResources = m_canLoadLocalResources; |
586 privilegeData->m_blockLocalAccessFromLocalOrigin = | 587 privilegeData->m_blockLocalAccessFromLocalOrigin = |
587 m_blockLocalAccessFromLocalOrigin; | 588 m_blockLocalAccessFromLocalOrigin; |
588 return privilegeData; | 589 return privilegeData; |
589 } | 590 } |
590 | 591 |
591 void SecurityOrigin::transferPrivilegesFrom( | 592 void SecurityOrigin::transferPrivilegesFrom( |
592 std::unique_ptr<PrivilegeData> privilegeData) { | 593 std::unique_ptr<PrivilegeData> privilegeData) { |
593 m_universalAccess = privilegeData->m_universalAccess; | 594 m_universalAccess = privilegeData->m_universalAccess; |
(...skipping 17 matching lines...) Expand all Loading... |
611 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); | 612 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); |
612 } else { | 613 } else { |
613 *success = url::CanonicalizeHost(host.characters16(), | 614 *success = url::CanonicalizeHost(host.characters16(), |
614 url::Component(0, host.length()), | 615 url::Component(0, host.length()), |
615 &canonOutput, &outHost); | 616 &canonOutput, &outHost); |
616 } | 617 } |
617 return String::fromUTF8(canonOutput.data(), canonOutput.length()); | 618 return String::fromUTF8(canonOutput.data(), canonOutput.length()); |
618 } | 619 } |
619 | 620 |
620 } // namespace blink | 621 } // namespace blink |
OLD | NEW |