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

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

Issue 2594263004: Fix NavigationControllerBrowserTest.SubframeForwardRedirect (Closed)
Patch Set: relax dcheck Created 3 years, 11 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
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 void NavigationRequest::TransferNavigationHandleOwnership( 383 void NavigationRequest::TransferNavigationHandleOwnership(
384 RenderFrameHostImpl* render_frame_host) { 384 RenderFrameHostImpl* render_frame_host) {
385 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); 385 render_frame_host->SetNavigationHandle(std::move(navigation_handle_));
386 } 386 }
387 387
388 void NavigationRequest::OnRequestRedirected( 388 void NavigationRequest::OnRequestRedirected(
389 const net::RedirectInfo& redirect_info, 389 const net::RedirectInfo& redirect_info,
390 const scoped_refptr<ResourceResponse>& response) { 390 const scoped_refptr<ResourceResponse>& response) {
391 // If a redirect occurs, the original site instance we thought is the
392 // destination could change.
393 dest_site_instance_ = nullptr;
394
391 // If the navigation is no longer a POST, the POST data should be reset. 395 // If the navigation is no longer a POST, the POST data should be reset.
392 if (redirect_info.new_method != "POST") 396 if (redirect_info.new_method != "POST")
393 common_params_.post_data = nullptr; 397 common_params_.post_data = nullptr;
394 398
395 // Mark time for the Navigation Timing API. 399 // Mark time for the Navigation Timing API.
396 if (request_params_.navigation_timing.redirect_start.is_null()) { 400 if (request_params_.navigation_timing.redirect_start.is_null()) {
397 request_params_.navigation_timing.redirect_start = 401 request_params_.navigation_timing.redirect_start =
398 request_params_.navigation_timing.fetch_start; 402 request_params_.navigation_timing.fetch_start;
399 } 403 }
400 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now(); 404 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now();
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 691 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
688 692
689 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 693 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
690 common_params_, request_params_, 694 common_params_, request_params_,
691 is_view_source_); 695 is_view_source_);
692 696
693 frame_tree_node_->ResetNavigationRequest(true); 697 frame_tree_node_->ResetNavigationRequest(true);
694 } 698 }
695 699
696 } // namespace content 700 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698