| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |