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