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 <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 | 1262 |
1263 // Since we're just saving some resources we need, disallow downloading. | 1263 // Since we're just saving some resources we need, disallow downloading. |
1264 ResourceRequestInfoImpl* extra_info = | 1264 ResourceRequestInfoImpl* extra_info = |
1265 CreateRequestInfo(child_id, route_id, false, context); | 1265 CreateRequestInfo(child_id, route_id, false, context); |
1266 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. | 1266 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. |
1267 | 1267 |
1268 BeginRequestInternal(request.Pass(), handler.Pass()); | 1268 BeginRequestInternal(request.Pass(), handler.Pass()); |
1269 } | 1269 } |
1270 | 1270 |
1271 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( | 1271 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( |
1272 const GlobalRequestID& id) { | 1272 const GlobalRequestID& id, const GURL& target_url) { |
1273 GetLoader(id)->MarkAsTransferring(); | 1273 GetLoader(id)->MarkAsTransferring(target_url); |
1274 } | 1274 } |
1275 | 1275 |
1276 void ResourceDispatcherHostImpl::ResumeDeferredNavigation( | 1276 void ResourceDispatcherHostImpl::ResumeDeferredNavigation( |
1277 const GlobalRequestID& id) { | 1277 const GlobalRequestID& id) { |
1278 ResourceLoader* loader = GetLoader(id); | 1278 ResourceLoader* loader = GetLoader(id); |
1279 if (loader) { | 1279 if (loader) { |
1280 // The response we were meant to resume could have already been canceled. | 1280 // The response we were meant to resume could have already been canceled. |
1281 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); | 1281 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); |
1282 if (info->cross_site_handler()) | 1282 if (info->cross_site_handler()) |
1283 info->cross_site_handler()->ResumeResponse(); | 1283 info->cross_site_handler()->ResumeResponse(); |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1871 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
1872 && !policy->CanReadRawCookies(child_id)) { | 1872 && !policy->CanReadRawCookies(child_id)) { |
1873 VLOG(1) << "Denied unauthorized request for raw headers"; | 1873 VLOG(1) << "Denied unauthorized request for raw headers"; |
1874 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1874 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
1875 } | 1875 } |
1876 | 1876 |
1877 return load_flags; | 1877 return load_flags; |
1878 } | 1878 } |
1879 | 1879 |
1880 } // namespace content | 1880 } // namespace content |
OLD | NEW |