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

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

Issue 2392283005: Reland "Merge of CrossSiteResourceHandler and NavigationResourceThrottle." (Closed)
Patch Set: Added debugging code from issue 2393903002 Created 4 years, 2 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 <utility> 7 #include <utility>
8 8
9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 400
401 if (navigation_data) 401 if (navigation_data)
402 navigation_handle_->set_navigation_data(std::move(navigation_data)); 402 navigation_handle_->set_navigation_data(std::move(navigation_data));
403 403
404 // Store the response and the StreamHandle until checks have been processed. 404 // Store the response and the StreamHandle until checks have been processed.
405 response_ = response; 405 response_ = response;
406 body_ = std::move(body); 406 body_ = std::move(body);
407 407
408 // Check if the navigation should be allowed to proceed. 408 // Check if the navigation should be allowed to proceed.
409 // TODO(clamy): pass the right values for request_id, is_download and
410 // is_stream.
409 navigation_handle_->WillProcessResponse( 411 navigation_handle_->WillProcessResponse(
410 render_frame_host, response->head.headers.get(), ssl_status, 412 render_frame_host, response->head.headers.get(), ssl_status,
413 GlobalRequestID(), common_params_.should_replace_current_entry, false,
414 false, base::Closure(),
411 base::Bind(&NavigationRequest::OnWillProcessResponseChecksComplete, 415 base::Bind(&NavigationRequest::OnWillProcessResponseChecksComplete,
412 base::Unretained(this))); 416 base::Unretained(this)));
413 } 417 }
414 418
415 void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache, 419 void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,
416 int net_error) { 420 int net_error) {
417 DCHECK(state_ == STARTED); 421 DCHECK(state_ == STARTED);
418 state_ = FAILED; 422 state_ = FAILED;
419 navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error)); 423 navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error));
420 frame_tree_node_->navigator()->FailedNavigation( 424 frame_tree_node_->navigator()->FailedNavigation(
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 559 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
556 560
557 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 561 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
558 common_params_, request_params_, 562 common_params_, request_params_,
559 is_view_source_); 563 is_view_source_);
560 564
561 frame_tree_node_->ResetNavigationRequest(true); 565 frame_tree_node_->ResetNavigationRequest(true);
562 } 566 }
563 567
564 } // namespace content 568 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl_unittest.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698