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

Unified Diff: content/browser/loader/downloaded_temp_file_impl.h

Issue 2503813002: Fix and refactor downloaded file handling in the loading stack (Closed)
Patch Set: move to dtor Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/downloaded_temp_file_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/downloaded_temp_file_impl.h
diff --git a/content/browser/loader/downloaded_temp_file_impl.h b/content/browser/loader/downloaded_temp_file_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..833b2cba9a931346aec604759d9d653f62a328b6
--- /dev/null
+++ b/content/browser/loader/downloaded_temp_file_impl.h
@@ -0,0 +1,35 @@
+// 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.
+
+#ifndef CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
+#define CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
+
+#include "base/macros.h"
+#include "content/common/content_export.h"
+#include "content/common/url_loader_factory.mojom.h"
+
+namespace content {
+
+// DownloadedTempFileImpl is created on the download_to_file mode of resource
+// loading. The instance is held by the client and lives until the client
+// destroys the interface, slightly after the URLLoader is destroyed.
+class CONTENT_EXPORT DownloadedTempFileImpl final
+ : public mojom::DownloadedTempFile {
+ public:
+ static mojo::InterfacePtr<mojom::DownloadedTempFile> Create(int child_id,
+ int request_id);
+
+ DownloadedTempFileImpl(int child_id, int request_id);
+ ~DownloadedTempFileImpl() override;
+
+ private:
+ int child_id_;
+ int request_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(DownloadedTempFileImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/downloaded_temp_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698