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

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

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from dcheng@. Created 4 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 | « content/common/frame_messages.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
9 #include <vector>
10
8 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/content_security_policy_header.h"
9 #include "url/origin.h" 13 #include "url/origin.h"
10 14
11 namespace blink { 15 namespace blink {
12 enum class WebTreeScopeType; 16 enum class WebTreeScopeType;
13 enum class WebSandboxFlags; 17 enum class WebSandboxFlags;
14 } 18 }
15 19
16 namespace content { 20 namespace content {
17 21
18 // This structure holds information that needs to be replicated between a 22 // This structure holds information that needs to be replicated between a
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // across different, unrelated navigations (i.e. to refer to the frame 76 // across different, unrelated navigations (i.e. to refer to the frame
73 // when going back/forward in session history OR when refering to the frame 77 // when going back/forward in session history OR when refering to the frame
74 // in layout tests results). 78 // in layout tests results).
75 // 79 //
76 // |unique_name| needs to be replicated to ensure that unique name for a given 80 // |unique_name| needs to be replicated to ensure that unique name for a given
77 // frame is the same across all renderers - without replication a renderer 81 // frame is the same across all renderers - without replication a renderer
78 // might arrive at a different value when recalculating the unique name from 82 // might arrive at a different value when recalculating the unique name from
79 // scratch. 83 // scratch.
80 std::string unique_name; 84 std::string unique_name;
81 85
86 // Accumulated CSP headers - gathered from http headers, <meta> elements,
87 // parent frames (in case of about:blank frames).
88 std::vector<ContentSecurityPolicyHeader> accumulated_csp_headers;
89
82 // Whether the frame is in a document tree or a shadow tree, per the Shadow 90 // Whether the frame is in a document tree or a shadow tree, per the Shadow
83 // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/ 91 // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/
84 // Note: This should really be const, as it can never change once a frame is 92 // Note: This should really be const, as it can never change once a frame is
85 // created. However, making it const makes it a pain to embed into IPC message 93 // created. However, making it const makes it a pain to embed into IPC message
86 // params: having a const member implicitly deletes the copy assignment 94 // params: having a const member implicitly deletes the copy assignment
87 // operator. 95 // operator.
88 blink::WebTreeScopeType scope; 96 blink::WebTreeScopeType scope;
89 97
90 // True if a frame's current document should strictly block all mixed 98 // True if a frame's current document should strictly block all mixed
91 // content. Updates are immediately sent to all frame proxies when 99 // content. Updates are immediately sent to all frame proxies when
92 // frames live in different processes. 100 // frames live in different processes.
93 bool should_enforce_strict_mixed_content_checking; 101 bool should_enforce_strict_mixed_content_checking;
94 102
95 // True if a frame's origin is unique and should be considered potentially 103 // True if a frame's origin is unique and should be considered potentially
96 // trustworthy. 104 // trustworthy.
97 bool has_potentially_trustworthy_unique_origin; 105 bool has_potentially_trustworthy_unique_origin;
98 106
99 // TODO(alexmos): Eventually, this structure can also hold other state that 107 // TODO(alexmos): Eventually, this structure can also hold other state that
100 // needs to be replicated, such as frame sizing info. 108 // needs to be replicated, such as frame sizing info.
101 }; 109 };
102 110
103 } // namespace content 111 } // namespace content
104 112
105 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 113 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698