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

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

Issue 6777002: Merge 79440 - Clean up unload-related state after the ack is received. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/696/src/
Patch Set: Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 GlobalRequestID global_id(params.new_render_process_host_id, 662 GlobalRequestID global_id(params.new_render_process_host_id,
663 params.new_request_id); 663 params.new_request_id);
664 PendingRequestList::iterator i = pending_requests_.find(global_id); 664 PendingRequestList::iterator i = pending_requests_.find(global_id);
665 if (i != pending_requests_.end()) { 665 if (i != pending_requests_.end()) {
666 // The response we were meant to resume could have already been canceled. 666 // The response we were meant to resume could have already been canceled.
667 ResourceDispatcherHostRequestInfo* info = InfoForRequest(i->second); 667 ResourceDispatcherHostRequestInfo* info = InfoForRequest(i->second);
668 if (info->cross_site_handler()) 668 if (info->cross_site_handler())
669 info->cross_site_handler()->ResumeResponse(); 669 info->cross_site_handler()->ResumeResponse();
670 } 670 }
671 } else { 671 } else {
672 // This is a tab close, so just forward the message to close it. 672 // This is a tab close, so we will close the tab in OnClosePageACK.
673 DCHECK(params.new_render_process_host_id == -1); 673 DCHECK(params.new_render_process_host_id == -1);
674 DCHECK(params.new_request_id == -1); 674 DCHECK(params.new_request_id == -1);
675 CallRenderViewHost(params.closing_process_id,
676 params.closing_route_id,
677 &RenderViewHost::ClosePageIgnoringUnloadEvents);
678 } 675 }
676 // Update the RenderViewHost's internal state after the ACK.
677 CallRenderViewHost(params.closing_process_id,
678 params.closing_route_id,
679 &RenderViewHost::OnClosePageACK,
680 params.for_cross_site_transition);
679 } 681 }
680 682
681 // We are explicitly forcing the download of 'url'. 683 // We are explicitly forcing the download of 'url'.
682 void ResourceDispatcherHost::BeginDownload( 684 void ResourceDispatcherHost::BeginDownload(
683 const GURL& url, 685 const GURL& url,
684 const GURL& referrer, 686 const GURL& referrer,
685 const DownloadSaveInfo& save_info, 687 const DownloadSaveInfo& save_info,
686 bool prompt_for_save_location, 688 bool prompt_for_save_location,
687 int child_id, 689 int child_id,
688 int route_id, 690 int route_id,
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 return is_prefetch_enabled_; 1956 return is_prefetch_enabled_;
1955 } 1957 }
1956 1958
1957 // static 1959 // static
1958 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { 1960 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) {
1959 is_prefetch_enabled_ = value; 1961 is_prefetch_enabled_ = value;
1960 } 1962 }
1961 1963
1962 // static 1964 // static
1963 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; 1965 bool ResourceDispatcherHost::is_prefetch_enabled_ = false;
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_manager_browsertest.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698