Chromium Code Reviews| 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 // Navigating to a new location means a new, fresh set of http headers and/or | 582 // Navigating to a new location means a new, fresh set of http headers and/or |
| 583 // <meta> elements - we need to reset CSP policy to an empty set. | 583 // <meta> elements - we need to reset CSP policy to an empty set. |
| 584 if (!is_navigation_within_page) | 584 if (!is_navigation_within_page) { |
| 585 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); | 585 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); |
| 586 render_frame_host->frame_tree_node()->ResetFeaturePolicy(); | |
|
alexmos
2016/11/17 21:45:58
nit: update comment to mention feature policy (so
iclelland
2016/11/18 16:12:37
Done.
| |
| 587 } | |
| 586 | 588 |
| 587 // When using --site-per-process, we notify the RFHM for all navigations, | 589 // When using --site-per-process, we notify the RFHM for all navigations, |
| 588 // not just main frame navigations. | 590 // not just main frame navigations. |
| 589 if (oopifs_possible) { | 591 if (oopifs_possible) { |
| 590 FrameTreeNode* frame = render_frame_host->frame_tree_node(); | 592 FrameTreeNode* frame = render_frame_host->frame_tree_node(); |
| 591 frame->render_manager()->DidNavigateFrame( | 593 frame->render_manager()->DidNavigateFrame( |
| 592 render_frame_host, params.gesture == NavigationGestureUser); | 594 render_frame_host, params.gesture == NavigationGestureUser); |
| 593 } | 595 } |
| 594 | 596 |
| 595 // Update the site of the SiteInstance if it doesn't have one yet, unless | 597 // 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... | |
| 1264 if (navigation_handle) | 1266 if (navigation_handle) |
| 1265 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1267 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1266 | 1268 |
| 1267 controller_->SetPendingEntry(std::move(entry)); | 1269 controller_->SetPendingEntry(std::move(entry)); |
| 1268 if (delegate_) | 1270 if (delegate_) |
| 1269 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1271 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1270 } | 1272 } |
| 1271 } | 1273 } |
| 1272 | 1274 |
| 1273 } // namespace content | 1275 } // namespace content |
| OLD | NEW |