| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 // origin because it creates a RenderFrameProxy that needs this to initialize | 572 // origin because it creates a RenderFrameProxy that needs this to initialize |
| 573 // its security context. This origin will also be sent to RenderFrameProxies | 573 // its security context. This origin will also be sent to RenderFrameProxies |
| 574 // created via mojom::Renderer::CreateView and | 574 // created via mojom::Renderer::CreateView and |
| 575 // mojom::Renderer::CreateFrameProxy. | 575 // mojom::Renderer::CreateFrameProxy. |
| 576 render_frame_host->frame_tree_node()->SetCurrentOrigin( | 576 render_frame_host->frame_tree_node()->SetCurrentOrigin( |
| 577 params.origin, params.has_potentially_trustworthy_unique_origin); | 577 params.origin, params.has_potentially_trustworthy_unique_origin); |
| 578 | 578 |
| 579 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( | 579 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( |
| 580 params.insecure_request_policy); | 580 params.insecure_request_policy); |
| 581 | 581 |
| 582 render_frame_host->frame_tree_node()->SetInsecureNavigationsSet( |
| 583 params.insecure_navigations_set); |
| 584 |
| 582 // Navigating to a new location means a new, fresh set of http headers and/or | 585 // Navigating to a new location means a new, fresh set of http headers and/or |
| 583 // <meta> elements - we need to reset CSP and Feature Policy. | 586 // <meta> elements - we need to reset CSP and Feature Policy. |
| 584 if (!is_navigation_within_page) { | 587 if (!is_navigation_within_page) { |
| 585 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); | 588 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); |
| 586 render_frame_host->frame_tree_node()->ResetFeaturePolicy(); | 589 render_frame_host->frame_tree_node()->ResetFeaturePolicy(); |
| 587 } | 590 } |
| 588 | 591 |
| 589 // When using --site-per-process, we notify the RFHM for all navigations, | 592 // When using --site-per-process, we notify the RFHM for all navigations, |
| 590 // not just main frame navigations. | 593 // not just main frame navigations. |
| 591 if (oopifs_possible) { | 594 if (oopifs_possible) { |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 if (navigation_handle) | 1270 if (navigation_handle) |
| 1268 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1271 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1269 | 1272 |
| 1270 controller_->SetPendingEntry(std::move(entry)); | 1273 controller_->SetPendingEntry(std::move(entry)); |
| 1271 if (delegate_) | 1274 if (delegate_) |
| 1272 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1275 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1273 } | 1276 } |
| 1274 } | 1277 } |
| 1275 | 1278 |
| 1276 } // namespace content | 1279 } // namespace content |
| OLD | NEW |