| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 m_securityOrigin = securityOrigin; | 54 m_securityOrigin = securityOrigin; |
| 55 } | 55 } |
| 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 applySandboxFlags(mask); |
| 65 } |
| 66 |
| 67 void SecurityContext::applySandboxFlags(SandboxFlags mask) |
| 68 { |
| 64 m_sandboxFlags |= mask; | 69 m_sandboxFlags |= mask; |
| 65 | 70 |
| 66 if (isSandboxed(SandboxOrigin) && securityOrigin() && !securityOrigin()->isU
nique()) { | 71 if (isSandboxed(SandboxOrigin) && securityOrigin() && !securityOrigin()->isU
nique()) { |
| 67 setSecurityOrigin(SecurityOrigin::createUnique()); | 72 setSecurityOrigin(SecurityOrigin::createUnique()); |
| 68 didUpdateSecurityOrigin(); | 73 didUpdateSecurityOrigin(); |
| 69 } | 74 } |
| 70 } | 75 } |
| 71 | 76 |
| 72 String SecurityContext::addressSpaceForBindings() const | 77 String SecurityContext::addressSpaceForBindings() const |
| 73 { | 78 { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return; | 115 return; |
| 111 ASSERT(!name.isEmpty()); | 116 ASSERT(!name.isEmpty()); |
| 112 ASSERT(RuntimeEnabledFeatures::suboriginsEnabled()); | 117 ASSERT(RuntimeEnabledFeatures::suboriginsEnabled()); |
| 113 ASSERT(m_securityOrigin.get()); | 118 ASSERT(m_securityOrigin.get()); |
| 114 ASSERT(!m_securityOrigin->hasSuborigin() || m_securityOrigin->suboriginName(
) == name); | 119 ASSERT(!m_securityOrigin->hasSuborigin() || m_securityOrigin->suboriginName(
) == name); |
| 115 m_securityOrigin->addSuborigin(name); | 120 m_securityOrigin->addSuborigin(name); |
| 116 didUpdateSecurityOrigin(); | 121 didUpdateSecurityOrigin(); |
| 117 } | 122 } |
| 118 | 123 |
| 119 } // namespace blink | 124 } // namespace blink |
| OLD | NEW |