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

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

Issue 2557063002: Upgrade Insecure Requests: bugfixes, tests, and support for OOPIF.
Patch Set: Addressed comments (@nasko #2). Created 4 years 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/common/frame_replication_state.cc » ('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> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 bool matches_all_origins; 32 bool matches_all_origins;
33 std::vector<url::Origin> origins; 33 std::vector<url::Origin> origins;
34 }; 34 };
35 35
36 using ParsedFeaturePolicy = std::vector<FeaturePolicyParsedWhitelist>; 36 using ParsedFeaturePolicy = std::vector<FeaturePolicyParsedWhitelist>;
37 37
38 // This structure holds information that needs to be replicated between a 38 // This structure holds information that needs to be replicated between a
39 // RenderFrame and any of its associated RenderFrameProxies. 39 // RenderFrame and any of its associated RenderFrameProxies.
40 struct CONTENT_EXPORT FrameReplicationState { 40 struct CONTENT_EXPORT FrameReplicationState {
41 FrameReplicationState(); 41 FrameReplicationState();
42 FrameReplicationState(blink::WebTreeScopeType scope, 42 FrameReplicationState(
43 const std::string& name, 43 blink::WebTreeScopeType scope,
44 const std::string& unique_name, 44 const std::string& name,
45 blink::WebSandboxFlags sandbox_flags, 45 const std::string& unique_name,
46 blink::WebInsecureRequestPolicy insecure_request_policy, 46 blink::WebSandboxFlags sandbox_flags,
47 bool has_potentially_trustworthy_unique_origin); 47 blink::WebInsecureRequestPolicy insecure_request_policy,
48 const std::vector<uint32_t>& insecure_navigations_set,
49 bool has_potentially_trustworthy_unique_origin);
48 FrameReplicationState(const FrameReplicationState& other); 50 FrameReplicationState(const FrameReplicationState& other);
49 ~FrameReplicationState(); 51 ~FrameReplicationState();
50 52
51 // Current origin of the frame. This field is updated whenever a frame 53 // Current origin of the frame. This field is updated whenever a frame
52 // navigation commits. 54 // navigation commits.
53 // 55 //
54 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame 56 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame
55 // proxies when in --site-per-process mode. This isn't ideal, since Blink 57 // proxies when in --site-per-process mode. This isn't ideal, since Blink
56 // typically needs a proxy's origin only when performing security checks on 58 // typically needs a proxy's origin only when performing security checks on
57 // the ancestors of a local frame. So, as a future improvement, we could 59 // the ancestors of a local frame. So, as a future improvement, we could
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // created. However, making it const makes it a pain to embed into IPC message 115 // created. However, making it const makes it a pain to embed into IPC message
114 // params: having a const member implicitly deletes the copy assignment 116 // params: having a const member implicitly deletes the copy assignment
115 // operator. 117 // operator.
116 blink::WebTreeScopeType scope; 118 blink::WebTreeScopeType scope;
117 119
118 // The insecure request policy that a frame's current document is enforcing. 120 // The insecure request policy that a frame's current document is enforcing.
119 // Updates are immediately sent to all frame proxies when frames live in 121 // Updates are immediately sent to all frame proxies when frames live in
120 // different processes. 122 // different processes.
121 blink::WebInsecureRequestPolicy insecure_request_policy; 123 blink::WebInsecureRequestPolicy insecure_request_policy;
122 124
125 // The upgrade insecure navigations set that a frame's current document is
126 // enforcing. Updates are immediately sent to all frame proxies when frames
127 // live in different processes.
128 std::vector<uint32_t> insecure_navigations_set;
129
123 // True if a frame's origin is unique and should be considered potentially 130 // True if a frame's origin is unique and should be considered potentially
124 // trustworthy. 131 // trustworthy.
125 bool has_potentially_trustworthy_unique_origin; 132 bool has_potentially_trustworthy_unique_origin;
126 }; 133 };
127 134
128 } // namespace content 135 } // namespace content
129 136
130 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 137 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/common/frame_replication_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698