Chromium Code Reviews| Index: chrome/browser/download/download_manager.h |
| diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h |
| index 84b83990bdc9d8b103e2cf6de26f95b2a6239305..c2917e07a1a739a4e01915b371eabba02f0ef2c6 100644 |
| --- a/chrome/browser/download/download_manager.h |
| +++ b/chrome/browser/download/download_manager.h |
| @@ -70,6 +70,8 @@ class DownloadManager |
| public: |
| explicit DownloadManager(DownloadStatusUpdater* status_updater); |
| + typedef std::vector<std::pair<int64, FilePath> > PathVector; |
|
Paweł Hajdan Jr.
2011/05/10 11:37:51
nit: According to http://google-styleguide.googlec
|
| + |
| // Shutdown the download manager. Must be called before destruction. |
| void Shutdown(); |
| @@ -233,6 +235,9 @@ class DownloadManager |
| // Called when the user has validated the download of a dangerous file. |
| void DangerousDownloadValidated(DownloadItem* download); |
| + // Check the existence of downloaded files. |
|
Paweł Hajdan Jr.
2011/05/10 11:37:51
The comment should be more precise than "Check". I
|
| + void CheckForFilesRemoval(); |
| + |
| // Callback function after url is checked with safebrowsing service. |
| void CheckDownloadUrlDone(DownloadCreateInfo* info, bool is_dangerous_url); |
| @@ -272,6 +277,17 @@ class DownloadManager |
| ~DownloadManager(); |
| + // Called on the FILE thread to check the existence of downloaded files. |
| + // We don't check the file existence on the UI thread to prevent UI thread |
|
Paweł Hajdan Jr.
2011/05/10 11:37:51
nit: Remove the "We don't" part, we don't write th
|
| + // from stalling by interacting with the file system. |
| + void CheckForFilesRemovalOnFileThread(const PathVector& existing_paths); |
|
Paweł Hajdan Jr.
2011/05/10 11:37:51
nit: How about renaming existing_paths to just pat
|
| + |
| + // Called on the UI thread when the FILE thread finishes to check the |
| + // existence of downloaded files. The UI thread updates the state of the |
| + // downloaded but non-existent files, and then notifies the fact to the |
| + // observers of those files. |
| + void OnFilesRemovalDetected(const PathVector& removed_paths); |
| + |
| // Called on the download thread to check whether the suggested file path |
| // exists. We don't check if the file exists on the UI thread to avoid UI |
| // stalls from interacting with the file system. |