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

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

Issue 82273002: Fix various issues in RedirectToFileResourceHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various Created 7 years 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 2e0253ae5198a353b15da7219dcfa0c8f9ad9977..c8bea9b0d29488517716220741d1df615df67494 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -49,10 +49,6 @@ namespace net {
class URLRequestJobFactory;
}
-namespace webkit_blob {
-class ShareableFileReference;
-}
-
namespace content {
class ResourceContext;
class ResourceDispatcherHostDelegate;
@@ -60,6 +56,7 @@ class ResourceMessageDelegate;
class ResourceMessageFilter;
class ResourceRequestInfoImpl;
class SaveFileManager;
+class TemporaryFileManager;
class WebContentsImpl;
struct DownloadSaveInfo;
struct Referrer;
@@ -180,15 +177,6 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// Cancels any blocked request for the specified route id.
void CancelBlockedRequestsForRoute(int child_id, int route_id);
- // Maintains a collection of temp files created in support of
- // the download_to_file capability. Used to grant access to the
- // child process and to defer deletion of the file until it's
- // no longer needed.
- void RegisterDownloadedTempFile(
- int child_id, int request_id,
- webkit_blob::ShareableFileReference* reference);
- void UnregisterDownloadedTempFile(int child_id, int request_id);
-
// Needed for the sync IPC message dispatcher macros.
bool Send(IPC::Message* message);
@@ -432,15 +420,6 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
LoaderMap pending_loaders_;
- // 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<webkit_blob::ShareableFileReference> >
- DeletableFilesMap; // key is request id
- typedef std::map<int, DeletableFilesMap>
- RegisteredTempFiles; // key is child process id
- RegisteredTempFiles registered_temp_files_;
-
// A timer that periodically calls UpdateLoadStates while pending_requests_
// is not empty.
scoped_ptr<base::RepeatingTimer<ResourceDispatcherHostImpl> >
@@ -518,6 +497,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
scoped_ptr<ResourceScheduler> scheduler_;
+ scoped_ptr<TemporaryFileManager> temporary_file_manager_;
+
typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap;
OfflineMap offline_policy_map_;

Powered by Google App Engine
This is Rietveld 408576698