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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 678 // (see https://crbug.com/560511). Instead, the next cross-process navigation | 678 // (see https://crbug.com/560511). Instead, the next cross-process navigation |
| 679 // or transfer should decide whether to swap as if the net error had not | 679 // or transfer should decide whether to swap as if the net error had not |
| 680 // occurred. | 680 // occurred. |
| 681 // TODO(creis): Remove this block and always set the URL once transfers handle | 681 // TODO(creis): Remove this block and always set the URL once transfers handle |
| 682 // network errors or PlzNavigate is enabled. See https://crbug.com/588314. | 682 // network errors or PlzNavigate is enabled. See https://crbug.com/588314. |
| 683 if (!params.url_is_unreachable) | 683 if (!params.url_is_unreachable) |
| 684 render_frame_host->set_last_successful_url(params.url); | 684 render_frame_host->set_last_successful_url(params.url); |
| 685 | 685 |
| 686 // After setting the last committed origin, reset the feature policy in the | 686 // After setting the last committed origin, reset the feature policy in the |
| 687 // RenderFrameHost to a blank policy based on the parent frame. | 687 // RenderFrameHost to a blank policy based on the parent frame. |
| 688 render_frame_host->ResetFeaturePolicy(); | 688 if (!did_navigate) |
|
alexmos
2017/02/24 21:21:12
A couple of concerns with this. First, I think yo
iclelland
2017/03/03 15:26:31
Thanks for that -- I've updated the condition, to
| |
| 689 render_frame_host->ResetFeaturePolicy(); | |
| 689 | 690 |
| 690 // Send notification about committed provisional loads. This notification is | 691 // Send notification about committed provisional loads. This notification is |
| 691 // different from the NAV_ENTRY_COMMITTED notification which doesn't include | 692 // different from the NAV_ENTRY_COMMITTED notification which doesn't include |
| 692 // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations. | 693 // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations. |
| 693 if (details.type != NAVIGATION_TYPE_NAV_IGNORE && delegate_) { | 694 if (details.type != NAVIGATION_TYPE_NAV_IGNORE && delegate_) { |
| 694 DCHECK_EQ(!render_frame_host->GetParent(), | 695 DCHECK_EQ(!render_frame_host->GetParent(), |
| 695 did_navigate ? details.is_main_frame : false); | 696 did_navigate ? details.is_main_frame : false); |
| 696 navigation_handle->DidCommitNavigation(params, details.did_replace_entry, | 697 navigation_handle->DidCommitNavigation(params, details.did_replace_entry, |
| 697 details.previous_url, details.type, | 698 details.previous_url, details.type, |
| 698 render_frame_host); | 699 render_frame_host); |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1287 if (navigation_handle) | 1288 if (navigation_handle) |
| 1288 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1289 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1289 | 1290 |
| 1290 controller_->SetPendingEntry(std::move(entry)); | 1291 controller_->SetPendingEntry(std::move(entry)); |
| 1291 if (delegate_) | 1292 if (delegate_) |
| 1292 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1293 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1293 } | 1294 } |
| 1294 } | 1295 } |
| 1295 | 1296 |
| 1296 } // namespace content | 1297 } // namespace content |
| OLD | NEW |