Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 2151743002: Pass validated URL to WebContentsObserver::DidFailProvidsionalLoad. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_delegate.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698