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

Unified Diff: content/common/url_loader.mojom

Issue 2503813002: Fix and refactor downloaded file handling in the loading stack (Closed)
Patch Set: revert an unrelated change 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
Index: content/common/url_loader.mojom
diff --git a/content/common/url_loader.mojom b/content/common/url_loader.mojom
index e797c7e1a15e40c696680d3c063e5eed74b8e73f..74634bc7c94b89b020da060de44a7f638786d340 100644
--- a/content/common/url_loader.mojom
+++ b/content/common/url_loader.mojom
@@ -25,9 +25,17 @@ interface URLLoader {
Cancel();
};
+interface DownloadedTempFile {
+ // Cleans up a downloaded temporary file created for 'download_to_file' case
+ // of resource loading.
+ Release();
+};
+
interface URLLoaderClient {
- // Called when the response head is received.
- OnReceiveResponse(URLResponseHead head);
+ // Called when the response head is received. |downloaded_file| is non-null on
+ // the 'download_to_file' case. Call DownloadedTempFile::Release() once the
+ // resource load has completed and the client finished its clean up.
+ OnReceiveResponse(URLResponseHead head, DownloadedTempFile? downloaded_file);
// Called when some data from a resource request has been downloaded to the
// file. This is only called in the 'download_to_file' case and replaces

Powered by Google App Engine
This is Rietveld 408576698