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

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

Issue 1829413002: [Downloads] Retain a BlobDataHandle in DownloadUrlParameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 << url.possibly_invalid_spec(); 785 << url.possibly_invalid_spec();
786 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; 786 return DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST;
787 } 787 }
788 788
789 ResourceRequestInfoImpl* extra_info = 789 ResourceRequestInfoImpl* extra_info =
790 CreateRequestInfo(child_id, render_view_route_id, 790 CreateRequestInfo(child_id, render_view_route_id,
791 render_frame_route_id, true, context); 791 render_frame_route_id, true, context);
792 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login); 792 extra_info->set_do_not_prompt_for_login(do_not_prompt_for_login);
793 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. 793 extra_info->AssociateWithRequest(request.get()); // Request takes ownership.
794 794
795 if (request->url().SchemeIs(url::kBlobScheme)) { 795 if (request->url().SchemeIs(url::kBlobScheme) &&
796 !storage::BlobProtocolHandler::GetRequestBlobDataHandle(request.get())) {
796 ChromeBlobStorageContext* blob_context = 797 ChromeBlobStorageContext* blob_context =
797 GetChromeBlobStorageContextForResourceContext(context); 798 GetChromeBlobStorageContextForResourceContext(context);
798 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( 799 storage::BlobProtocolHandler::SetRequestedBlobDataHandle(
799 request.get(), 800 request.get(),
800 blob_context->context()->GetBlobDataFromPublicURL(request->url())); 801 blob_context->context()->GetBlobDataFromPublicURL(request->url()));
801 } 802 }
802 803
803 // From this point forward, the |DownloadResourceHandler| is responsible for 804 // From this point forward, the |DownloadResourceHandler| is responsible for
804 // |started_callback|. 805 // |started_callback|.
805 scoped_ptr<ResourceHandler> handler(CreateResourceHandlerForDownload( 806 scoped_ptr<ResourceHandler> handler(CreateResourceHandlerForDownload(
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2685 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2686 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2686 response->head.security_info = SerializeSecurityInfo(ssl); 2687 response->head.security_info = SerializeSecurityInfo(ssl);
2687 } 2688 }
2688 2689
2689 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2690 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2690 return cert_store_for_testing_ ? cert_store_for_testing_ 2691 return cert_store_for_testing_ ? cert_store_for_testing_
2691 : CertStore::GetInstance(); 2692 : CertStore::GetInstance();
2692 } 2693 }
2693 2694
2694 } // namespace content 2695 } // 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