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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 frame_tree_node->navigation_request(); | 980 frame_tree_node->navigation_request(); |
981 | 981 |
982 // Client redirects during the initial history navigation of a child frame | 982 // Client redirects during the initial history navigation of a child frame |
983 // should take precedence over the history navigation (despite being renderer- | 983 // should take precedence over the history navigation (despite being renderer- |
984 // initiated). See https://crbug.com/348447 and https://crbug.com/691168. | 984 // initiated). See https://crbug.com/348447 and https://crbug.com/691168. |
985 if (ongoing_navigation_request && | 985 if (ongoing_navigation_request && |
986 ongoing_navigation_request->request_params() | 986 ongoing_navigation_request->request_params() |
987 .is_history_navigation_in_new_child) { | 987 .is_history_navigation_in_new_child) { |
988 // Preemptively clear this local pointer before deleting the request. | 988 // Preemptively clear this local pointer before deleting the request. |
989 ongoing_navigation_request = nullptr; | 989 ongoing_navigation_request = nullptr; |
| 990 CHECK(false); |
990 frame_tree_node->ResetNavigationRequest(false, true); | 991 frame_tree_node->ResetNavigationRequest(false, true); |
991 } | 992 } |
992 | 993 |
993 // The renderer-initiated navigation request is ignored iff a) there is an | 994 // The renderer-initiated navigation request is ignored iff a) there is an |
994 // ongoing request b) which is browser or user-initiated and c) the renderer | 995 // ongoing request b) which is browser or user-initiated and c) the renderer |
995 // request is not user-initiated. | 996 // request is not user-initiated. |
996 if (ongoing_navigation_request && | 997 if (ongoing_navigation_request && |
997 (ongoing_navigation_request->browser_initiated() || | 998 (ongoing_navigation_request->browser_initiated() || |
998 ongoing_navigation_request->begin_params().has_user_gesture) && | 999 ongoing_navigation_request->begin_params().has_user_gesture) && |
999 !begin_params.has_user_gesture) { | 1000 !begin_params.has_user_gesture) { |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 if (navigation_handle) | 1297 if (navigation_handle) |
1297 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1298 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
1298 | 1299 |
1299 controller_->SetPendingEntry(std::move(entry)); | 1300 controller_->SetPendingEntry(std::move(entry)); |
1300 if (delegate_) | 1301 if (delegate_) |
1301 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1302 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
1302 } | 1303 } |
1303 } | 1304 } |
1304 | 1305 |
1305 } // namespace content | 1306 } // namespace content |
OLD | NEW |