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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. | 1373 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. |
1374 | 1374 |
1375 BeginRequestInternal(request.Pass(), handler.Pass()); | 1375 BeginRequestInternal(request.Pass(), handler.Pass()); |
1376 } | 1376 } |
1377 | 1377 |
1378 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( | 1378 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( |
1379 const GlobalRequestID& id) { | 1379 const GlobalRequestID& id) { |
1380 GetLoader(id)->MarkAsTransferring(); | 1380 GetLoader(id)->MarkAsTransferring(); |
1381 } | 1381 } |
1382 | 1382 |
| 1383 void ResourceDispatcherHostImpl::CancelTransferringNavigation( |
| 1384 const GlobalRequestID& id) { |
| 1385 // Request should still exist and be in the middle of a transfer. |
| 1386 DCHECK(IsTransferredNavigation(id)); |
| 1387 RemovePendingRequest(id.child_id, id.request_id); |
| 1388 } |
| 1389 |
1383 void ResourceDispatcherHostImpl::ResumeDeferredNavigation( | 1390 void ResourceDispatcherHostImpl::ResumeDeferredNavigation( |
1384 const GlobalRequestID& id) { | 1391 const GlobalRequestID& id) { |
1385 ResourceLoader* loader = GetLoader(id); | 1392 ResourceLoader* loader = GetLoader(id); |
1386 if (loader) { | 1393 if (loader) { |
1387 // The response we were meant to resume could have already been canceled. | 1394 // The response we were meant to resume could have already been canceled. |
1388 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); | 1395 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); |
1389 if (info->cross_site_handler()) | 1396 if (info->cross_site_handler()) |
1390 info->cross_site_handler()->ResumeResponse(); | 1397 info->cross_site_handler()->ResumeResponse(); |
1391 } | 1398 } |
1392 } | 1399 } |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1990 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
1984 && !policy->CanReadRawCookies(child_id)) { | 1991 && !policy->CanReadRawCookies(child_id)) { |
1985 VLOG(1) << "Denied unauthorized request for raw headers"; | 1992 VLOG(1) << "Denied unauthorized request for raw headers"; |
1986 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1993 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
1987 } | 1994 } |
1988 | 1995 |
1989 return load_flags; | 1996 return load_flags; |
1990 } | 1997 } |
1991 | 1998 |
1992 } // namespace content | 1999 } // namespace content |
OLD | NEW |