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.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // TODO(creis): Find a way to cancel any pending RFH here. | 241 // TODO(creis): Find a way to cancel any pending RFH here. |
242 } | 242 } |
243 | 243 |
244 // Discard the pending navigation entry if needed. | 244 // Discard the pending navigation entry if needed. |
245 // PlzNavigate: the entry has already been discarded in FailedNavigation. | 245 // PlzNavigate: the entry has already been discarded in FailedNavigation. |
246 if (!IsBrowserSideNavigationEnabled()) { | 246 if (!IsBrowserSideNavigationEnabled()) { |
247 DiscardPendingEntryOnFailureIfNeeded( | 247 DiscardPendingEntryOnFailureIfNeeded( |
248 render_frame_host->navigation_handle()); | 248 render_frame_host->navigation_handle()); |
249 } | 249 } |
250 | 250 |
251 if (delegate_) | 251 if (delegate_) { |
252 delegate_->DidFailProvisionalLoadWithError(render_frame_host, params); | 252 delegate_->DidFailProvisionalLoadWithError( |
| 253 render_frame_host, validated_url, params.error_code, |
| 254 params.error_description, params.was_ignored_by_handler); |
| 255 } |
253 } | 256 } |
254 | 257 |
255 void NavigatorImpl::DidFailLoadWithError( | 258 void NavigatorImpl::DidFailLoadWithError( |
256 RenderFrameHostImpl* render_frame_host, | 259 RenderFrameHostImpl* render_frame_host, |
257 const GURL& url, | 260 const GURL& url, |
258 int error_code, | 261 int error_code, |
259 const base::string16& error_description, | 262 const base::string16& error_description, |
260 bool was_ignored_by_handler) { | 263 bool was_ignored_by_handler) { |
261 if (delegate_) { | 264 if (delegate_) { |
262 delegate_->DidFailLoadWithError( | 265 delegate_->DidFailLoadWithError( |
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 if (pending_entry != controller_->GetVisibleEntry() || | 1190 if (pending_entry != controller_->GetVisibleEntry() || |
1188 !should_preserve_entry) { | 1191 !should_preserve_entry) { |
1189 controller_->DiscardPendingEntry(true); | 1192 controller_->DiscardPendingEntry(true); |
1190 | 1193 |
1191 // Also force the UI to refresh. | 1194 // Also force the UI to refresh. |
1192 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1195 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
1193 } | 1196 } |
1194 } | 1197 } |
1195 | 1198 |
1196 } // namespace content | 1199 } // namespace content |
OLD | NEW |