| 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 <stddef.h> | 9 #include <stddef.h> |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 << url.possibly_invalid_spec(); | 791 << url.possibly_invalid_spec(); |
| 792 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; | 792 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; |
| 793 } | 793 } |
| 794 | 794 |
| 795 ResourceRequestInfoImpl* extra_info = | 795 ResourceRequestInfoImpl* extra_info = |
| 796 CreateRequestInfo(child_id, render_view_route_id, | 796 CreateRequestInfo(child_id, render_view_route_id, |
| 797 render_frame_route_id, true, context); | 797 render_frame_route_id, true, context); |
| 798 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login); | 798 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login); |
| 799 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. | 799 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. |
| 800 | 800 |
| 801 if (request->url().SchemeIs(url::kBlobScheme)) { | 801 if (request->url().SchemeIs(url::kBlobScheme) && |
| 802 !storage::BlobProtocolHandler::GetRequestBlobDataHandle(request.get())) { |
| 802 ChromeBlobStorageContext* blob_context = | 803 ChromeBlobStorageContext* blob_context = |
| 803 GetChromeBlobStorageContextForResourceContext(context); | 804 GetChromeBlobStorageContextForResourceContext(context); |
| 804 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( | 805 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( |
| 805 request.get(), | 806 request.get(), |
| 806 blob_context->context()->GetBlobDataFromPublicURL(request->url())); | 807 blob_context->context()->GetBlobDataFromPublicURL(request->url())); |
| 807 } | 808 } |
| 808 | 809 |
| 809 // From this point forward, the |DownloadResourceHandler| is responsible for | 810 // From this point forward, the |DownloadResourceHandler| is responsible for |
| 810 // |started_callback|. | 811 // |started_callback|. |
| 811 scoped_ptr<ResourceHandler> handler(CreateResourceHandlerForDownload( | 812 scoped_ptr<ResourceHandler> handler(CreateResourceHandlerForDownload( |
| (...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 load_flags |= net::LOAD_PREFETCH; | 2648 load_flags |= net::LOAD_PREFETCH; |
| 2648 } | 2649 } |
| 2649 | 2650 |
| 2650 if (is_sync_load) | 2651 if (is_sync_load) |
| 2651 load_flags |= net::LOAD_IGNORE_LIMITS; | 2652 load_flags |= net::LOAD_IGNORE_LIMITS; |
| 2652 | 2653 |
| 2653 return load_flags; | 2654 return load_flags; |
| 2654 } | 2655 } |
| 2655 | 2656 |
| 2656 } // namespace content | 2657 } // namespace content |
| OLD | NEW |