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

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: -Release 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 435b0ee13cee81ead80e1cdafc55a0deda33481d..f2caa5e2ed7b4093d546546eeb671fffd9ebdade 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -48,13 +48,10 @@ namespace base {
class FilePath;
}
-namespace storage {
-class ShareableFileReference;
-}
-
namespace content {
class AppCacheService;
class AsyncRevalidationManager;
+class DownloadedTempFileImpl;
class LoaderDelegate;
class NavigationURLLoaderImplCore;
class NavigationUIData;
@@ -214,8 +211,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