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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 143183009: When cross-site navigations are cancelled, delete the request being transferred (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: *Really* remove AbortTransfer Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 #include "content/browser/child_process_security_policy_impl.h" 27 #include "content/browser/child_process_security_policy_impl.h"
28 #include "content/browser/cross_site_request_manager.h" 28 #include "content/browser/cross_site_request_manager.h"
29 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 29 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
30 #include "content/browser/frame_host/frame_tree.h" 30 #include "content/browser/frame_host/frame_tree.h"
31 #include "content/browser/gpu/compositor_util.h" 31 #include "content/browser/gpu/compositor_util.h"
32 #include "content/browser/gpu/gpu_data_manager_impl.h" 32 #include "content/browser/gpu/gpu_data_manager_impl.h"
33 #include "content/browser/gpu/gpu_process_host.h" 33 #include "content/browser/gpu/gpu_process_host.h"
34 #include "content/browser/gpu/gpu_surface_tracker.h" 34 #include "content/browser/gpu/gpu_surface_tracker.h"
35 #include "content/browser/host_zoom_map_impl.h" 35 #include "content/browser/host_zoom_map_impl.h"
36 #include "content/browser/loader/resource_dispatcher_host_impl.h" 36 #include "content/browser/loader/resource_dispatcher_host_impl.h"
37 #include "content/browser/renderer_host/cross_site_transferring_request.h"
37 #include "content/browser/renderer_host/dip_util.h" 38 #include "content/browser/renderer_host/dip_util.h"
38 #include "content/browser/renderer_host/input/timeout_monitor.h" 39 #include "content/browser/renderer_host/input/timeout_monitor.h"
39 #include "content/browser/renderer_host/media/audio_renderer_host.h" 40 #include "content/browser/renderer_host/media/audio_renderer_host.h"
40 #include "content/browser/renderer_host/render_process_host_impl.h" 41 #include "content/browser/renderer_host/render_process_host_impl.h"
41 #include "content/browser/renderer_host/render_view_host_delegate.h" 42 #include "content/browser/renderer_host/render_view_host_delegate.h"
42 #include "content/common/accessibility_messages.h" 43 #include "content/common/accessibility_messages.h"
43 #include "content/common/browser_plugin/browser_plugin_messages.h" 44 #include "content/common/browser_plugin/browser_plugin_messages.h"
44 #include "content/common/content_switches_internal.h" 45 #include "content/common/content_switches_internal.h"
45 #include "content/common/desktop_notification_messages.h" 46 #include "content/common/desktop_notification_messages.h"
46 #include "content/common/drag_messages.h" 47 #include "content/common/drag_messages.h"
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 // cancel the timeout timer. 705 // cancel the timeout timer.
705 increment_in_flight_event_count(); 706 increment_in_flight_event_count();
706 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); 707 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
707 send_should_close_start_time_ = base::TimeTicks::Now(); 708 send_should_close_start_time_ = base::TimeTicks::Now();
708 Send(new ViewMsg_ShouldClose(GetRoutingID())); 709 Send(new ViewMsg_ShouldClose(GetRoutingID()));
709 } 710 }
710 } 711 }
711 712
712 void RenderViewHostImpl::OnCrossSiteResponse( 713 void RenderViewHostImpl::OnCrossSiteResponse(
713 const GlobalRequestID& global_request_id, 714 const GlobalRequestID& global_request_id,
714 bool is_transfer, 715 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
715 const std::vector<GURL>& transfer_url_chain, 716 const std::vector<GURL>& transfer_url_chain,
716 const Referrer& referrer, 717 const Referrer& referrer,
717 PageTransition page_transition, 718 PageTransition page_transition,
718 int64 frame_id, 719 int64 frame_id,
719 bool should_replace_current_entry) { 720 bool should_replace_current_entry) {
720 FrameTreeNode* node = NULL; 721 FrameTreeNode* node = NULL;
721 if (frame_id != -1 && 722 if (frame_id != -1 &&
722 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { 723 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
723 node = delegate_->GetFrameTree()->FindByFrameID(frame_id); 724 node = delegate_->GetFrameTree()->FindByFrameID(frame_id);
724 } 725 }
725 726
726 // TODO(creis): We should always be able to get the RFHM for a frame_id, 727 // TODO(creis): We should always be able to get the RFHM for a frame_id,
727 // but today the frame_id is -1 for the main frame. 728 // but today the frame_id is -1 for the main frame.
728 RenderViewHostDelegate::RendererManagement* manager = node ? 729 RenderViewHostDelegate::RendererManagement* manager = node ?
729 node->render_manager() : delegate_->GetRendererManagementDelegate(); 730 node->render_manager() : delegate_->GetRendererManagementDelegate();
730 manager->OnCrossSiteResponse(this, global_request_id, is_transfer, 731 manager->OnCrossSiteResponse(this, global_request_id,
732 cross_site_transferring_request.Pass(),
731 transfer_url_chain, referrer, page_transition, 733 transfer_url_chain, referrer, page_transition,
732 frame_id, should_replace_current_entry); 734 frame_id, should_replace_current_entry);
733 } 735 }
734 736
735 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { 737 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
736 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); 738 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
737 } 739 }
738 740
739 void RenderViewHostImpl::SwapOut() { 741 void RenderViewHostImpl::SwapOut() {
740 SetState(STATE_WAITING_FOR_UNLOAD_ACK); 742 SetState(STATE_WAITING_FOR_UNLOAD_ACK);
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 void RenderViewHostImpl::AttachToFrameTree() { 2164 void RenderViewHostImpl::AttachToFrameTree() {
2163 FrameTree* frame_tree = delegate_->GetFrameTree(); 2165 FrameTree* frame_tree = delegate_->GetFrameTree();
2164 2166
2165 frame_tree->ResetForMainFrameSwap(); 2167 frame_tree->ResetForMainFrameSwap();
2166 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2168 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2167 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2169 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2168 } 2170 }
2169 } 2171 }
2170 2172
2171 } // namespace content 2173 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698