summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_file_manager.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-02 21:44:37 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-02 21:44:37 +0000
commitd83d03aa8eea8f6173e161f134816746f8384e47 (patch)
tree10208e844592117a7d65fc3557a49e9126997a27 /chrome/browser/download/save_file_manager.h
parentb3f541017baf3eaaf4fc52d392630f9f040bae5e (diff)
downloadchromium_src-d83d03aa8eea8f6173e161f134816746f8384e47.zip
chromium_src-d83d03aa8eea8f6173e161f134816746f8384e47.tar.gz
chromium_src-d83d03aa8eea8f6173e161f134816746f8384e47.tar.bz2
Fourth patch in getting rid of caching MessageLoop pointers.
BUG=25354 Review URL: http://codereview.chromium.org/348037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_file_manager.h')
-rw-r--r--chrome/browser/download/save_file_manager.h30
1 files changed, 1 insertions, 29 deletions
diff --git a/chrome/browser/download/save_file_manager.h b/chrome/browser/download/save_file_manager.h
index 5f3d564..a77f052 100644
--- a/chrome/browser/download/save_file_manager.h
+++ b/chrome/browser/download/save_file_manager.h
@@ -72,7 +72,6 @@ class IOBuffer;
class GURL;
class SaveFile;
class SavePackage;
-class MessageLoop;
class ResourceDispatcherHost;
class Task;
class URLRequestContextGetter;
@@ -80,9 +79,7 @@ class URLRequestContextGetter;
class SaveFileManager
: public base::RefCountedThreadSafe<SaveFileManager> {
public:
- SaveFileManager(MessageLoop* ui_loop,
- MessageLoop* io_loop,
- ResourceDispatcherHost* rdh);
+ SaveFileManager(ResourceDispatcherHost* rdh);
~SaveFileManager();
// Lifetime management.
@@ -127,10 +124,6 @@ class SaveFileManager
// Helper function for deleting specified file.
void DeleteDirectoryOrFile(const FilePath& full_path, bool is_dir);
- // For posting notifications from the UI and file threads.
- MessageLoop* ui_loop() const { return ui_loop_; }
- MessageLoop* file_loop() const { return file_loop_; }
-
// Runs on file thread to save a file by copying from file system when
// original url is using file scheme.
void SaveLocalFile(const GURL& original_file_url,
@@ -154,12 +147,6 @@ class SaveFileManager
// A cleanup helper that runs on the file thread.
void OnShutdown();
- // The resource does not come from the network, but we still needs to call
- // this function for getting unique save ID by calling
- // OnRequireSaveJobFromOtherSource in the net IO thread and start saving
- // operation. This function is called on the UI thread.
- void RequireSaveJobFromOtherSource(SaveFileCreateInfo* info);
-
// Called only on UI thread to get the SavePackage for a tab's profile.
static SavePackage* GetSavePackageFromRenderIds(int render_process_id,
int review_view_id);
@@ -199,10 +186,6 @@ class SaveFileManager
// For those requests that do not have valid save id, use
// map:(url, SavePackage) to find the request and remove it.
void OnErrorFinished(GURL save_url, int tab_id);
- // Handler for a notification sent to the UI thread.
- // The user has requested a cancel in the UI thread, so send a cancel request
- // to stop the network requests in net IO thread.
- void OnCancelSaveRequest(int render_process_id, int request_id);
// Notifies SavePackage that the whole page saving job is finished.
void OnFinishSavePageJob(int render_process_id, int render_view_id);
@@ -232,17 +215,6 @@ class SaveFileManager
typedef base::hash_map<int, SaveFile*> SaveFileMap;
SaveFileMap save_file_map_;
- // Message loop that the SavePackages live on.
- MessageLoop* ui_loop_;
-
- // We cache the IO loop, we will use it to request resources from network.
- MessageLoop* io_loop_;
-
- // We cache the file loop, we will use it to do real file operation.
- // We guarantee that we won't access them incorrectly during the shutdown
- // process
- MessageLoop* file_loop_;
-
ResourceDispatcherHost* resource_dispatcher_host_;
// Tracks which SavePackage to send data to, called only on UI thread.