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

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

Issue 1835913002: [Merge M50] [Downloads] Retain a BlobDataHandle in DownloadUrlParameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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
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 <stddef.h> 9 #include <stddef.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698