Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/browser/loader/downloaded_temp_file_impl.h" | |
| 6 | |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | |
| 8 #include "storage/browser/blob/shareable_file_reference.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 DownloadedTempFileImpl::DownloadedTempFileImpl(ResourceDispatcherHostImpl* rdh, | |
| 13 int child_id, | |
| 14 int request_id, | |
| 15 const base::FilePath& path) | |
| 16 : binding_(this), | |
| 17 rdh_(rdh), | |
| 18 child_id_(child_id), | |
| 19 request_id_(request_id), | |
| 20 reference_(storage::ShareableFileReference::Get(path)) { | |
| 21 DCHECK(rdh_); | |
| 22 DCHECK(reference_); | |
| 23 } | |
| 24 | |
| 25 DownloadedTempFileImpl::~DownloadedTempFileImpl() {} | |
| 26 | |
| 27 void DownloadedTempFileImpl::Release() { | |
| 28 rdh_->UnregisterDownloadedTempFile(child_id_, request_id_); | |
| 29 } | |
| 30 | |
| 31 mojo::InterfacePtr<mojom::DownloadedTempFile> | |
| 32 DownloadedTempFileImpl::CreateInterfacePtrAndBind() { | |
|
yhirano
2016/11/15 13:15:26
How about setting an connection_error_handler call
tzik
2016/11/16 09:14:56
SG. Updated.
| |
| 33 return binding_.CreateInterfacePtrAndBind(); | |
| 34 } | |
| 35 | |
| 36 } // namespace content | |
| OLD | NEW |