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

Side by Side Diff: content/common/frame_replication_state.h

Issue 2046733003: Replicate WebInsecureRequestPolicy instead of a bool for strict mixed content checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@securitycontext
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 5 #ifndef CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
6 #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 6 #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/content_security_policy_header.h" 12 #include "content/common/content_security_policy_header.h"
13 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h"
13 #include "url/origin.h" 14 #include "url/origin.h"
14 15
15 namespace blink { 16 namespace blink {
16 enum class WebTreeScopeType; 17 enum class WebTreeScopeType;
17 enum class WebSandboxFlags; 18 enum class WebSandboxFlags;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 // This structure holds information that needs to be replicated between a 23 // This structure holds information that needs to be replicated between a
23 // RenderFrame and any of its associated RenderFrameProxies. 24 // RenderFrame and any of its associated RenderFrameProxies.
24 struct CONTENT_EXPORT FrameReplicationState { 25 struct CONTENT_EXPORT FrameReplicationState {
25 FrameReplicationState(); 26 FrameReplicationState();
26 FrameReplicationState(blink::WebTreeScopeType scope, 27 FrameReplicationState(blink::WebTreeScopeType scope,
27 const std::string& name, 28 const std::string& name,
28 const std::string& unique_name, 29 const std::string& unique_name,
29 blink::WebSandboxFlags sandbox_flags, 30 blink::WebSandboxFlags sandbox_flags,
30 bool should_enforce_strict_mixed_content_checking, 31 blink::WebInsecureRequestPolicy insecure_request_policy,
31 bool has_potentially_trustworthy_unique_origin); 32 bool has_potentially_trustworthy_unique_origin);
32 FrameReplicationState(const FrameReplicationState& other); 33 FrameReplicationState(const FrameReplicationState& other);
33 ~FrameReplicationState(); 34 ~FrameReplicationState();
34 35
35 // Current origin of the frame. This field is updated whenever a frame 36 // Current origin of the frame. This field is updated whenever a frame
36 // navigation commits. 37 // navigation commits.
37 // 38 //
38 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame 39 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame
39 // proxies when in --site-per-process mode. This isn't ideal, since Blink 40 // proxies when in --site-per-process mode. This isn't ideal, since Blink
40 // typically needs a proxy's origin only when performing security checks on 41 // typically needs a proxy's origin only when performing security checks on
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::vector<ContentSecurityPolicyHeader> accumulated_csp_headers; 89 std::vector<ContentSecurityPolicyHeader> accumulated_csp_headers;
89 90
90 // Whether the frame is in a document tree or a shadow tree, per the Shadow 91 // Whether the frame is in a document tree or a shadow tree, per the Shadow
91 // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/ 92 // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/
92 // Note: This should really be const, as it can never change once a frame is 93 // Note: This should really be const, as it can never change once a frame is
93 // created. However, making it const makes it a pain to embed into IPC message 94 // created. However, making it const makes it a pain to embed into IPC message
94 // params: having a const member implicitly deletes the copy assignment 95 // params: having a const member implicitly deletes the copy assignment
95 // operator. 96 // operator.
96 blink::WebTreeScopeType scope; 97 blink::WebTreeScopeType scope;
97 98
98 // True if a frame's current document should strictly block all mixed 99 // The insecure request policy that a frame's current is enforcing.
alexmos 2016/06/07 19:00:06 Missing a word? A frame's current >document< is e
Mike West 2016/06/08 07:21:12 Done.
99 // content. Updates are immediately sent to all frame proxies when 100 // Updates are immediately sent to all frame proxies when frames live in
100 // frames live in different processes. 101 // different processes.
101 bool should_enforce_strict_mixed_content_checking; 102 blink::WebInsecureRequestPolicy insecure_request_policy;
102 103
103 // True if a frame's origin is unique and should be considered potentially 104 // True if a frame's origin is unique and should be considered potentially
104 // trustworthy. 105 // trustworthy.
105 bool has_potentially_trustworthy_unique_origin; 106 bool has_potentially_trustworthy_unique_origin;
106 107
107 // TODO(alexmos): Eventually, this structure can also hold other state that 108 // TODO(alexmos): Eventually, this structure can also hold other state that
108 // needs to be replicated, such as frame sizing info. 109 // needs to be replicated, such as frame sizing info.
109 }; 110 };
110 111
111 } // namespace content 112 } // namespace content
112 113
113 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 114 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698