| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 entry.ConstructStartNavigationParams(), | 400 entry.ConstructStartNavigationParams(), |
| 401 entry.ConstructRequestNavigationParams( | 401 entry.ConstructRequestNavigationParams( |
| 402 frame_entry, is_same_document_history_load, | 402 frame_entry, is_same_document_history_load, |
| 403 is_history_navigation_in_new_child, | 403 is_history_navigation_in_new_child, |
| 404 entry.GetSubframeUniqueNames(frame_tree_node), | 404 entry.GetSubframeUniqueNames(frame_tree_node), |
| 405 frame_tree_node->has_committed_real_load(), | 405 frame_tree_node->has_committed_real_load(), |
| 406 controller_->GetPendingEntryIndex() == -1, | 406 controller_->GetPendingEntryIndex() == -1, |
| 407 controller_->GetIndexOfEntry(&entry), | 407 controller_->GetIndexOfEntry(&entry), |
| 408 controller_->GetLastCommittedEntryIndex(), | 408 controller_->GetLastCommittedEntryIndex(), |
| 409 controller_->GetEntryCount())); | 409 controller_->GetEntryCount())); |
| 410 } else { | |
| 411 // No need to navigate again. Just resume the deferred request. | |
| 412 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation( | |
| 413 entry.transferred_global_request_id()); | |
| 414 } | 410 } |
| 415 } | 411 } |
| 416 | 412 |
| 417 // Make sure no code called via RFH::Navigate clears the pending entry. | 413 // Make sure no code called via RFH::Navigate clears the pending entry. |
| 418 if (is_pending_entry) | 414 if (is_pending_entry) |
| 419 CHECK_EQ(controller_->GetPendingEntry(), &entry); | 415 CHECK_EQ(controller_->GetPendingEntry(), &entry); |
| 420 | 416 |
| 421 if (controller_->GetPendingEntryIndex() == -1 && | 417 if (controller_->GetPendingEntryIndex() == -1 && |
| 422 IsRendererDebugURL(dest_url)) { | 418 IsRendererDebugURL(dest_url)) { |
| 423 // If the pending entry index is -1 (which means a new navigation rather | 419 // If the pending entry index is -1 (which means a new navigation rather |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 if (navigation_handle) | 1225 if (navigation_handle) |
| 1230 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1226 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1231 | 1227 |
| 1232 controller_->SetPendingEntry(std::move(entry)); | 1228 controller_->SetPendingEntry(std::move(entry)); |
| 1233 if (delegate_) | 1229 if (delegate_) |
| 1234 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1230 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1235 } | 1231 } |
| 1236 } | 1232 } |
| 1237 | 1233 |
| 1238 } // namespace content | 1234 } // namespace content |
| OLD | NEW |