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