Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: third_party/WebKit/Source/core/dom/SecurityContext.h

Issue 2838153002: Make most of CSP code work with non-Document ExecutionContext (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void EnforceSuborigin(const Suborigin&); 93 void EnforceSuborigin(const Suborigin&);
94 94
95 WebFeaturePolicy* GetFeaturePolicy() const { return feature_policy_.get(); } 95 WebFeaturePolicy* GetFeaturePolicy() const { return feature_policy_.get(); }
96 void InitializeFeaturePolicy(const WebParsedFeaturePolicy& parsed_header, 96 void InitializeFeaturePolicy(const WebParsedFeaturePolicy& parsed_header,
97 const WebParsedFeaturePolicy& container_policy, 97 const WebParsedFeaturePolicy& container_policy,
98 const WebFeaturePolicy* parent_feature_policy); 98 const WebFeaturePolicy* parent_feature_policy);
99 void UpdateFeaturePolicyOrigin(); 99 void UpdateFeaturePolicyOrigin();
100 100
101 void ApplySandboxFlags(SandboxFlags mask);
102
101 protected: 103 protected:
102 SecurityContext(); 104 SecurityContext();
103 virtual ~SecurityContext(); 105 virtual ~SecurityContext();
104 106
105 void SetContentSecurityPolicy(ContentSecurityPolicy*); 107 void SetContentSecurityPolicy(ContentSecurityPolicy*);
106 108
107 void ApplySandboxFlags(SandboxFlags mask);
108
109 private: 109 private:
110 RefPtr<SecurityOrigin> security_origin_; 110 RefPtr<SecurityOrigin> security_origin_;
111 Member<ContentSecurityPolicy> content_security_policy_; 111 Member<ContentSecurityPolicy> content_security_policy_;
112 std::unique_ptr<WebFeaturePolicy> feature_policy_; 112 std::unique_ptr<WebFeaturePolicy> feature_policy_;
113 113
114 SandboxFlags sandbox_flags_; 114 SandboxFlags sandbox_flags_;
115 115
116 WebAddressSpace address_space_; 116 WebAddressSpace address_space_;
117 WebInsecureRequestPolicy insecure_request_policy_; 117 WebInsecureRequestPolicy insecure_request_policy_;
118 InsecureNavigationsSet insecure_navigations_to_upgrade_; 118 InsecureNavigationsSet insecure_navigations_to_upgrade_;
119 }; 119 };
120 120
121 } // namespace blink 121 } // namespace blink
122 122
123 #endif // SecurityContext_h 123 #endif // SecurityContext_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698