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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 m_insecureRequestPolicy = policy; | 87 m_insecureRequestPolicy = policy; |
88 } | 88 } |
89 WebInsecureRequestPolicy getInsecureRequestPolicy() const { | 89 WebInsecureRequestPolicy getInsecureRequestPolicy() const { |
90 return m_insecureRequestPolicy; | 90 return m_insecureRequestPolicy; |
91 } | 91 } |
92 | 92 |
93 void enforceSuborigin(const Suborigin&); | 93 void enforceSuborigin(const Suborigin&); |
94 | 94 |
95 WebFeaturePolicy* getFeaturePolicy() const { return m_featurePolicy.get(); } | 95 WebFeaturePolicy* getFeaturePolicy() const { return m_featurePolicy.get(); } |
96 void initializeFeaturePolicy(const WebParsedFeaturePolicy& parsedHeader, | 96 void initializeFeaturePolicy(const WebParsedFeaturePolicy& parsedHeader, |
| 97 const WebParsedFeaturePolicy& containerPolicy, |
97 const WebFeaturePolicy* parentFeaturePolicy); | 98 const WebFeaturePolicy* parentFeaturePolicy); |
98 void updateFeaturePolicyOrigin(); | 99 void updateFeaturePolicyOrigin(); |
99 | 100 |
100 protected: | 101 protected: |
101 SecurityContext(); | 102 SecurityContext(); |
102 virtual ~SecurityContext(); | 103 virtual ~SecurityContext(); |
103 | 104 |
104 void setContentSecurityPolicy(ContentSecurityPolicy*); | 105 void setContentSecurityPolicy(ContentSecurityPolicy*); |
105 | 106 |
106 void applySandboxFlags(SandboxFlags mask); | 107 void applySandboxFlags(SandboxFlags mask); |
107 | 108 |
108 private: | 109 private: |
109 RefPtr<SecurityOrigin> m_securityOrigin; | 110 RefPtr<SecurityOrigin> m_securityOrigin; |
110 Member<ContentSecurityPolicy> m_contentSecurityPolicy; | 111 Member<ContentSecurityPolicy> m_contentSecurityPolicy; |
111 std::unique_ptr<WebFeaturePolicy> m_featurePolicy; | 112 std::unique_ptr<WebFeaturePolicy> m_featurePolicy; |
112 | 113 |
113 SandboxFlags m_sandboxFlags; | 114 SandboxFlags m_sandboxFlags; |
114 | 115 |
115 WebAddressSpace m_addressSpace; | 116 WebAddressSpace m_addressSpace; |
116 WebInsecureRequestPolicy m_insecureRequestPolicy; | 117 WebInsecureRequestPolicy m_insecureRequestPolicy; |
117 InsecureNavigationsSet m_insecureNavigationsToUpgrade; | 118 InsecureNavigationsSet m_insecureNavigationsToUpgrade; |
118 }; | 119 }; |
119 | 120 |
120 } // namespace blink | 121 } // namespace blink |
121 | 122 |
122 #endif // SecurityContext_h | 123 #endif // SecurityContext_h |
OLD | NEW |