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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
51 | 51 |
52 using InsecureNavigationsSet = HashSet<unsigned, WTF::AlreadyHashed>; | 52 using InsecureNavigationsSet = HashSet<unsigned, WTF::AlreadyHashed>; |
53 | 53 |
54 // The ordering here is important: 'Upgrade' overrides 'DoNotUpgrade'. | 54 // The ordering here is important: 'Upgrade' overrides 'DoNotUpgrade'. |
55 enum InsecureRequestsPolicy { | 55 enum InsecureRequestsPolicy { |
56 InsecureRequestsDoNotUpgrade = 0, | 56 InsecureRequestsDoNotUpgrade = 0, |
57 InsecureRequestsUpgrade | 57 InsecureRequestsUpgrade |
58 }; | 58 }; |
59 | 59 |
60 SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); } | 60 SecurityOrigin* getSecurityOrigin() const { return m_securityOrigin.get(); } |
61 ContentSecurityPolicy* contentSecurityPolicy() const { return m_contentSecur
ityPolicy.get(); } | 61 ContentSecurityPolicy* contentSecurityPolicy() const { return m_contentSecur
ityPolicy.get(); } |
62 | 62 |
63 // Explicitly override the security origin for this security context. | 63 // Explicitly override the security origin for this security context. |
64 // Note: It is dangerous to change the security origin of a script context | 64 // Note: It is dangerous to change the security origin of a script context |
65 // that already contains content. | 65 // that already contains content. |
66 void setSecurityOrigin(PassRefPtr<SecurityOrigin>); | 66 void setSecurityOrigin(PassRefPtr<SecurityOrigin>); |
67 virtual void didUpdateSecurityOrigin() = 0; | 67 virtual void didUpdateSecurityOrigin() = 0; |
68 | 68 |
69 SandboxFlags getSandboxFlags() const { return m_sandboxFlags; } | 69 SandboxFlags getSandboxFlags() const { return m_sandboxFlags; } |
70 bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; } | 70 bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; } |
(...skipping 30 matching lines...) Expand all Loading... |
101 | 101 |
102 WebAddressSpace m_addressSpace; | 102 WebAddressSpace m_addressSpace; |
103 InsecureRequestsPolicy m_insecureRequestsPolicy; | 103 InsecureRequestsPolicy m_insecureRequestsPolicy; |
104 InsecureNavigationsSet m_insecureNavigationsToUpgrade; | 104 InsecureNavigationsSet m_insecureNavigationsToUpgrade; |
105 bool m_enforceStrictMixedContentChecking; | 105 bool m_enforceStrictMixedContentChecking; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace blink | 108 } // namespace blink |
109 | 109 |
110 #endif // SecurityContext_h | 110 #endif // SecurityContext_h |
OLD | NEW |