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

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

Issue 2574953002: Fix Android unit_tests failures with PlzNavigate. (Closed)
Patch Set: fix last test and cleanup Created 4 years 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/appcache/appcache_navigation_handle.h" 9 #include "content/browser/appcache/appcache_navigation_handle.h"
10 #include "content/browser/appcache/chrome_appcache_service.h" 10 #include "content/browser/appcache/chrome_appcache_service.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 514
515 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 515 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
516 common_params_.url); 516 common_params_.url);
517 } 517 }
518 518
519 void NavigationRequest::OnStartChecksComplete( 519 void NavigationRequest::OnStartChecksComplete(
520 NavigationThrottle::ThrottleCheckResult result) { 520 NavigationThrottle::ThrottleCheckResult result) {
521 CHECK(result != NavigationThrottle::DEFER); 521 CHECK(result != NavigationThrottle::DEFER);
522 522
523 if (on_start_checks_complete_closure_)
524 on_start_checks_complete_closure_.Run();
525
523 // Abort the request if needed. This will destroy the NavigationRequest. 526 // Abort the request if needed. This will destroy the NavigationRequest.
524 if (result == NavigationThrottle::CANCEL_AND_IGNORE || 527 if (result == NavigationThrottle::CANCEL_AND_IGNORE ||
525 result == NavigationThrottle::CANCEL) { 528 result == NavigationThrottle::CANCEL) {
526 // TODO(clamy): distinguish between CANCEL and CANCEL_AND_IGNORE. 529 // TODO(clamy): distinguish between CANCEL and CANCEL_AND_IGNORE.
527 frame_tree_node_->ResetNavigationRequest(false); 530 frame_tree_node_->ResetNavigationRequest(false);
528 return; 531 return;
529 } 532 }
530 533
531 if (result == NavigationThrottle::BLOCK_REQUEST) { 534 if (result == NavigationThrottle::BLOCK_REQUEST) {
532 OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT); 535 OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 662 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
660 663
661 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 664 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
662 common_params_, request_params_, 665 common_params_, request_params_,
663 is_view_source_); 666 is_view_source_);
664 667
665 frame_tree_node_->ResetNavigationRequest(true); 668 frame_tree_node_->ResetNavigationRequest(true);
666 } 669 }
667 670
668 } // namespace content 671 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698