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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase past PlzNavigate CL Created 6 years, 4 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 // 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/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 void ResourceDispatcherHostImpl::CancelTransferringNavigation( 1400 void ResourceDispatcherHostImpl::CancelTransferringNavigation(
1401 const GlobalRequestID& id) { 1401 const GlobalRequestID& id) {
1402 // Request should still exist and be in the middle of a transfer. 1402 // Request should still exist and be in the middle of a transfer.
1403 DCHECK(IsTransferredNavigation(id)); 1403 DCHECK(IsTransferredNavigation(id));
1404 RemovePendingRequest(id.child_id, id.request_id); 1404 RemovePendingRequest(id.child_id, id.request_id);
1405 } 1405 }
1406 1406
1407 void ResourceDispatcherHostImpl::ResumeDeferredNavigation( 1407 void ResourceDispatcherHostImpl::ResumeDeferredNavigation(
1408 const GlobalRequestID& id) { 1408 const GlobalRequestID& id) {
1409 ResourceLoader* loader = GetLoader(id); 1409 ResourceLoader* loader = GetLoader(id);
1410 if (loader) { 1410 // The response we were meant to resume could have already been canceled.
1411 // The response we were meant to resume could have already been canceled. 1411 if (loader)
1412 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); 1412 loader->CompleteTransfer();
1413 if (info->cross_site_handler())
1414 info->cross_site_handler()->ResumeResponse();
1415 }
1416 } 1413 }
1417 1414
1418 // The object died, so cancel and detach all requests associated with it except 1415 // The object died, so cancel and detach all requests associated with it except
1419 // for downloads and detachable resources, which belong to the browser process 1416 // for downloads and detachable resources, which belong to the browser process
1420 // even if initiated via a renderer. 1417 // even if initiated via a renderer.
1421 void ResourceDispatcherHostImpl::CancelRequestsForProcess(int child_id) { 1418 void ResourceDispatcherHostImpl::CancelRequestsForProcess(int child_id) {
1422 CancelRequestsForRoute(child_id, -1 /* cancel all */); 1419 CancelRequestsForRoute(child_id, -1 /* cancel all */);
1423 registered_temp_files_.erase(child_id); 1420 registered_temp_files_.erase(child_id);
1424 } 1421 }
1425 1422
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 1994
1998 // Add a flag to selectively bypass the data reduction proxy if the resource 1995 // Add a flag to selectively bypass the data reduction proxy if the resource
1999 // type is not an image. 1996 // type is not an image.
2000 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 1997 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2001 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 1998 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2002 1999
2003 return load_flags; 2000 return load_flags;
2004 } 2001 }
2005 2002
2006 } // namespace content 2003 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/cross_site_resource_handler.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698