Chromium Code Reviews| Index: content/child/resource_dispatcher.cc |
| diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc |
| index 04759bbe674cb12b9965bd6616a16b074732af80..f2b5f112169ac653a1c6089c14d19038f3b03f77 100644 |
| --- a/content/child/resource_dispatcher.cc |
| +++ b/content/child/resource_dispatcher.cc |
| @@ -416,7 +416,8 @@ bool ResourceDispatcher::RemovePendingRequest(int request_id) { |
| PendingRequestInfo* request_info = it->second.get(); |
| - bool release_downloaded_file = request_info->download_to_file; |
| + bool release_downloaded_file = |
| + request_info->download_to_file && !it->second->url_loader; |
|
dcheng
2017/03/01 01:29:13
I think a comment here would be useful: I'm not ac
yhirano
2017/03/01 01:39:20
Done.
|
| ReleaseResourcesInMessageQueue(&request_info->deferred_message_queue); |
| @@ -673,11 +674,11 @@ int ResourceDispatcher::StartAsync( |
| std::unique_ptr<URLLoaderClientImpl> client( |
| new URLLoaderClientImpl(request_id, this, std::move(task_runner))); |
| mojom::URLLoaderAssociatedPtr url_loader; |
| - mojom::URLLoaderClientAssociatedPtrInfo client_ptr_info; |
| - client->Bind(&client_ptr_info); |
| + mojom::URLLoaderClientPtr client_ptr; |
| + client->Bind(&client_ptr); |
| url_loader_factory->CreateLoaderAndStart(MakeRequest(&url_loader), |
| routing_id, request_id, *request, |
| - std::move(client_ptr_info)); |
| + std::move(client_ptr)); |
| pending_requests_[request_id]->url_loader = std::move(url_loader); |
| pending_requests_[request_id]->url_loader_client = std::move(client); |
| } else { |