OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/browser/frame_host/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 // its security context. This origin will also be sent to RenderFrameProxies | 575 // its security context. This origin will also be sent to RenderFrameProxies |
576 // created via mojom::Renderer::CreateView and | 576 // created via mojom::Renderer::CreateView and |
577 // mojom::Renderer::CreateFrameProxy. | 577 // mojom::Renderer::CreateFrameProxy. |
578 render_frame_host->frame_tree_node()->SetCurrentOrigin( | 578 render_frame_host->frame_tree_node()->SetCurrentOrigin( |
579 params.origin, params.has_potentially_trustworthy_unique_origin); | 579 params.origin, params.has_potentially_trustworthy_unique_origin); |
580 | 580 |
581 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( | 581 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( |
582 params.insecure_request_policy); | 582 params.insecure_request_policy); |
583 | 583 |
584 // Navigating to a new location means a new, fresh set of http headers and/or | 584 // Navigating to a new location means a new, fresh set of http headers and/or |
585 // <meta> elements - we need to reset CSP policy to an empty set. | 585 // <meta> elements - we need to reset CSP and Feature Policy. |
586 if (!is_navigation_within_page) | 586 if (!is_navigation_within_page) { |
587 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); | 587 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); |
| 588 render_frame_host->frame_tree_node()->ResetFeaturePolicy(); |
| 589 } |
588 | 590 |
589 // When using --site-per-process, we notify the RFHM for all navigations, | 591 // When using --site-per-process, we notify the RFHM for all navigations, |
590 // not just main frame navigations. | 592 // not just main frame navigations. |
591 if (oopifs_possible) { | 593 if (oopifs_possible) { |
592 FrameTreeNode* frame = render_frame_host->frame_tree_node(); | 594 FrameTreeNode* frame = render_frame_host->frame_tree_node(); |
593 frame->render_manager()->DidNavigateFrame( | 595 frame->render_manager()->DidNavigateFrame( |
594 render_frame_host, params.gesture == NavigationGestureUser); | 596 render_frame_host, params.gesture == NavigationGestureUser); |
595 } | 597 } |
596 | 598 |
597 // Update the site of the SiteInstance if it doesn't have one yet, unless | 599 // Update the site of the SiteInstance if it doesn't have one yet, unless |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 if (navigation_handle) | 1268 if (navigation_handle) |
1267 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1269 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
1268 | 1270 |
1269 controller_->SetPendingEntry(std::move(entry)); | 1271 controller_->SetPendingEntry(std::move(entry)); |
1270 if (delegate_) | 1272 if (delegate_) |
1271 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1273 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
1272 } | 1274 } |
1273 } | 1275 } |
1274 | 1276 |
1275 } // namespace content | 1277 } // namespace content |
OLD | NEW |