| 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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 // Abort the renderer-initiated navigation request. | 1046 // Abort the renderer-initiated navigation request. |
| 1047 CancelNavigation(frame_tree_node, false); | 1047 CancelNavigation(frame_tree_node, false); |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 // PlzNavigate | 1050 // PlzNavigate |
| 1051 void NavigatorImpl::CancelNavigation(FrameTreeNode* frame_tree_node, | 1051 void NavigatorImpl::CancelNavigation(FrameTreeNode* frame_tree_node, |
| 1052 bool inform_renderer) { | 1052 bool inform_renderer) { |
| 1053 CHECK(IsBrowserSideNavigationEnabled()); | 1053 CHECK(IsBrowserSideNavigationEnabled()); |
| 1054 if (frame_tree_node->navigation_request() && |
| 1055 frame_tree_node->navigation_request()->navigation_handle()) { |
| 1056 frame_tree_node->navigation_request() |
| 1057 ->navigation_handle() |
| 1058 ->set_net_error_code(net::ERR_ABORTED); |
| 1059 } |
| 1054 frame_tree_node->ResetNavigationRequest(false, inform_renderer); | 1060 frame_tree_node->ResetNavigationRequest(false, inform_renderer); |
| 1055 if (frame_tree_node->IsMainFrame()) | 1061 if (frame_tree_node->IsMainFrame()) |
| 1056 navigation_data_.reset(); | 1062 navigation_data_.reset(); |
| 1057 } | 1063 } |
| 1058 | 1064 |
| 1059 void NavigatorImpl::LogResourceRequestTime( | 1065 void NavigatorImpl::LogResourceRequestTime( |
| 1060 base::TimeTicks timestamp, const GURL& url) { | 1066 base::TimeTicks timestamp, const GURL& url) { |
| 1061 if (navigation_data_ && navigation_data_->url_ == url) { | 1067 if (navigation_data_ && navigation_data_->url_ == url) { |
| 1062 navigation_data_->url_job_start_time_ = timestamp; | 1068 navigation_data_->url_job_start_time_ = timestamp; |
| 1063 UMA_HISTOGRAM_TIMES( | 1069 UMA_HISTOGRAM_TIMES( |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 if (navigation_handle) | 1302 if (navigation_handle) |
| 1297 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1303 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1298 | 1304 |
| 1299 controller_->SetPendingEntry(std::move(entry)); | 1305 controller_->SetPendingEntry(std::move(entry)); |
| 1300 if (delegate_) | 1306 if (delegate_) |
| 1301 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1307 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1302 } | 1308 } |
| 1303 } | 1309 } |
| 1304 | 1310 |
| 1305 } // namespace content | 1311 } // namespace content |
| OLD | NEW |