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

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

Issue 2503813002: Fix and refactor downloaded file handling in the loading stack (Closed)
Patch Set: +RunUntilIdle 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/browser/loader/resource_dispatcher_host_impl.h
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index 655d83fe80a4bde0b8343217f0838652104077a8..00af9cf54097999470bb8f4ced0c25ff10846a29 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -49,13 +49,10 @@ class URLRequest;
class HttpRequestHeaders;
}
-namespace storage {
-class ShareableFileReference;
-}
-
namespace content {
class AppCacheService;
class AsyncRevalidationManager;
+class DownloadedTempFileImpl;
class LoaderDelegate;
class NavigationURLLoaderImplCore;
class NavigationUIData;
@@ -213,8 +210,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// child process and to defer deletion of the file until it's
// no longer needed.
void RegisterDownloadedTempFile(
- int child_id, int request_id,
- const base::FilePath& file_path);
+ std::unique_ptr<DownloadedTempFileImpl> downloaded_temp_file);
void UnregisterDownloadedTempFile(int child_id, int request_id);
// Needed for the sync IPC message dispatcher macros.
@@ -686,7 +682,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// Collection of temp files downloaded for child processes via
// the download_to_file mechanism. We avoid deleting them until
// the client no longer needs them.
- typedef std::map<int, scoped_refptr<storage::ShareableFileReference> >
+ typedef std::map<int, std::unique_ptr<DownloadedTempFileImpl>>
DeletableFilesMap; // key is request id
typedef std::map<int, DeletableFilesMap>
RegisteredTempFiles; // key is child process id

Powered by Google App Engine
This is Rietveld 408576698