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

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

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Fixed replace computation Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/navigation_request.h" 5 #include "content/browser/frame_host/navigation_request.h"
6 6
7 #include "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/frame_host/frame_tree_node.h" 8 #include "content/browser/frame_host/frame_tree_node.h"
9 #include "content/browser/frame_host/navigation_controller_impl.h" 9 #include "content/browser/frame_host/navigation_controller_impl.h"
10 #include "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 void NavigationRequest::OnResponseStarted( 197 void NavigationRequest::OnResponseStarted(
198 const scoped_refptr<ResourceResponse>& response, 198 const scoped_refptr<ResourceResponse>& response,
199 scoped_ptr<StreamHandle> body) { 199 scoped_ptr<StreamHandle> body) {
200 DCHECK(state_ == STARTED); 200 DCHECK(state_ == STARTED);
201 state_ = RESPONSE_STARTED; 201 state_ = RESPONSE_STARTED;
202 frame_tree_node_->navigator()->CommitNavigation(frame_tree_node_, 202 frame_tree_node_->navigator()->CommitNavigation(frame_tree_node_,
203 response.get(), body.Pass()); 203 response.get(), body.Pass());
204 } 204 }
205 205
206 void NavigationRequest::OnRequestFailed(int net_error) { 206 void NavigationRequest::OnRequestFailed(bool in_cache, int net_error) {
Charlie Reis 2015/04/09 00:07:30 Please use the same name as in Navigator (has_stal
clamy 2015/04/10 14:04:49 Done.
207 DCHECK(state_ == STARTED); 207 DCHECK(state_ == STARTED);
208 state_ = FAILED; 208 state_ = FAILED;
209 // TODO(davidben): Network failures should display a network error page. 209 frame_tree_node_->navigator()->FailedNavigation(frame_tree_node_, in_cache,
210 NOTIMPLEMENTED() << " where net_error=" << net_error; 210 net_error);
211 } 211 }
212 212
213 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { 213 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
214 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 214 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
215 common_params_.url); 215 common_params_.url);
216 } 216 }
217 217
218 } // namespace content 218 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698