| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 void SecurityContext::setContentSecurityPolicy(PassRefPtrWillBeRawPtr<ContentSec
urityPolicy> contentSecurityPolicy) | 57 void SecurityContext::setContentSecurityPolicy(PassRefPtrWillBeRawPtr<ContentSec
urityPolicy> contentSecurityPolicy) |
| 58 { | 58 { |
| 59 m_contentSecurityPolicy = contentSecurityPolicy; | 59 m_contentSecurityPolicy = contentSecurityPolicy; |
| 60 } | 60 } |
| 61 | 61 |
| 62 void SecurityContext::enforceSandboxFlags(SandboxFlags mask) | 62 void SecurityContext::enforceSandboxFlags(SandboxFlags mask) |
| 63 { | 63 { |
| 64 m_sandboxFlags |= mask; | 64 m_sandboxFlags |= mask; |
| 65 | 65 |
| 66 if (isSandboxed(SandboxOrigin) && securityOrigin() && !securityOrigin()->isU
nique()) { | 66 if (isSandboxed(SandboxOrigin) && getSecurityOrigin() && !getSecurityOrigin(
)->isUnique()) { |
| 67 setSecurityOrigin(SecurityOrigin::createUnique()); | 67 setSecurityOrigin(SecurityOrigin::createUnique()); |
| 68 didUpdateSecurityOrigin(); | 68 didUpdateSecurityOrigin(); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 String SecurityContext::addressSpaceForBindings() const | 72 String SecurityContext::addressSpaceForBindings() const |
| 73 { | 73 { |
| 74 switch (m_addressSpace) { | 74 switch (m_addressSpace) { |
| 75 case WebAddressSpacePublic: | 75 case WebAddressSpacePublic: |
| 76 return "public"; | 76 return "public"; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return; | 110 return; |
| 111 ASSERT(!name.isEmpty()); | 111 ASSERT(!name.isEmpty()); |
| 112 ASSERT(RuntimeEnabledFeatures::suboriginsEnabled()); | 112 ASSERT(RuntimeEnabledFeatures::suboriginsEnabled()); |
| 113 ASSERT(m_securityOrigin.get()); | 113 ASSERT(m_securityOrigin.get()); |
| 114 ASSERT(!m_securityOrigin->hasSuborigin() || m_securityOrigin->suboriginName(
) == name); | 114 ASSERT(!m_securityOrigin->hasSuborigin() || m_securityOrigin->suboriginName(
) == name); |
| 115 m_securityOrigin->addSuborigin(name); | 115 m_securityOrigin->addSuborigin(name); |
| 116 didUpdateSecurityOrigin(); | 116 didUpdateSecurityOrigin(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace blink | 119 } // namespace blink |
| OLD | NEW |