Index: content/browser/loader/downloaded_temp_file_impl.cc |
diff --git a/content/browser/loader/downloaded_temp_file_impl.cc b/content/browser/loader/downloaded_temp_file_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..88920d4328e023f39c29c0aa80c2513e3d6ea945 |
--- /dev/null |
+++ b/content/browser/loader/downloaded_temp_file_impl.cc |
@@ -0,0 +1,36 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/browser/loader/downloaded_temp_file_impl.h" |
+ |
+#include "content/browser/loader/resource_dispatcher_host_impl.h" |
+#include "storage/browser/blob/shareable_file_reference.h" |
+ |
+namespace content { |
+ |
+DownloadedTempFileImpl::DownloadedTempFileImpl(ResourceDispatcherHostImpl* rdh, |
+ int child_id, |
+ int request_id, |
+ const base::FilePath& path) |
+ : binding_(this), |
+ rdh_(rdh), |
+ child_id_(child_id), |
+ request_id_(request_id), |
+ reference_(storage::ShareableFileReference::Get(path)) { |
+ DCHECK(rdh_); |
+ DCHECK(reference_); |
+} |
+ |
+DownloadedTempFileImpl::~DownloadedTempFileImpl() {} |
+ |
+void DownloadedTempFileImpl::Release() { |
+ rdh_->UnregisterDownloadedTempFile(child_id_, request_id_); |
+} |
+ |
+mojo::InterfacePtr<mojom::DownloadedTempFile> |
+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.
|
+ return binding_.CreateInterfacePtrAndBind(); |
+} |
+ |
+} // namespace content |