OLD | NEW |
---|---|
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 Loading... | |
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(); |
Charlie Reis
2014/08/18 23:27:53
Note: We now only use this for transfers that end
nasko
2014/08/19 16:45:23
Converting to this doesn't remove the cross_site_h
Charlie Reis
2014/08/19 21:20:31
I think the sole difference is that we set loader-
| |
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 Loading... | |
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 |
OLD | NEW |