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

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

Issue 2508973006: Kill vestigial transfer requests (Closed)
Patch Set: comments Created 4 years, 1 month 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/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain, 475 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain,
476 referrer, page_transition, global_request_id, 476 referrer, page_transition, global_request_id,
477 should_replace_current_entry, 477 should_replace_current_entry,
478 transfer_navigation_handle_->IsPost() ? "POST" : "GET", 478 transfer_navigation_handle_->IsPost() ? "POST" : "GET",
479 transfer_navigation_handle_->resource_request_body(), extra_headers); 479 transfer_navigation_handle_->resource_request_body(), extra_headers);
480 480
481 // If the navigation continued, the NavigationHandle should have been 481 // If the navigation continued, the NavigationHandle should have been
482 // transfered to a RenderFrameHost. In the other cases, it should be cleared. 482 // transfered to a RenderFrameHost. In the other cases, it should be cleared.
483 // If the NavigationHandle wasn't claimed, this will lead to the cancelation 483 // If the NavigationHandle wasn't claimed, this will lead to the cancelation
484 // of the request in the network stack. 484 // of the request in the network stack.
485 transfer_navigation_handle_.reset(); 485 if (transfer_navigation_handle_) {
486 transfer_navigation_handle_->set_is_transferring(false);
487 transfer_navigation_handle_.reset();
488 }
486 489
487 // If the navigation in the new renderer did not start, inform the 490 // If the navigation in the new renderer did not start, inform the
488 // FrameTreeNode that it stopped loading. 491 // FrameTreeNode that it stopped loading.
489 if (!frame_tree_node_->IsLoading() && frame_tree_node_was_loading) 492 if (!frame_tree_node_->IsLoading() && frame_tree_node_was_loading)
490 frame_tree_node_->DidStopLoading(); 493 frame_tree_node_->DidStopLoading();
491 } 494 }
492 495
493 void RenderFrameHostManager::DidNavigateFrame( 496 void RenderFrameHostManager::DidNavigateFrame(
494 RenderFrameHostImpl* render_frame_host, 497 RenderFrameHostImpl* render_frame_host,
495 bool was_caused_by_user_gesture) { 498 bool was_caused_by_user_gesture) {
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 resolved_url)) { 2728 resolved_url)) {
2726 DCHECK(!dest_instance || 2729 DCHECK(!dest_instance ||
2727 dest_instance == render_frame_host_->GetSiteInstance()); 2730 dest_instance == render_frame_host_->GetSiteInstance());
2728 return false; 2731 return false;
2729 } 2732 }
2730 2733
2731 return true; 2734 return true;
2732 } 2735 }
2733 2736
2734 } // namespace content 2737 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698