OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // The DownloadFileManager owns a set of DownloadFile objects, each of which | 5 // The DownloadFileManager owns a set of DownloadFile objects, each of which |
6 // represent one in progress download and performs the disk IO for that | 6 // represent one in progress download and performs the disk IO for that |
7 // download. The DownloadFileManager itself is a singleton object owned by the | 7 // download. The DownloadFileManager itself is a singleton object owned by the |
8 // ResourceDispatcherHost. | 8 // ResourceDispatcherHost. |
9 // | 9 // |
10 // The DownloadFileManager uses the file_thread for performing file write | 10 // The DownloadFileManager uses the file_thread for performing file write |
(...skipping 18 matching lines...) Expand all Loading... |
29 // io_thread (stops net IO | 29 // io_thread (stops net IO |
30 // for download) | 30 // for download) |
31 // | 31 // |
32 // The DownloadFileManager tracks download requests, mapping from a download | 32 // The DownloadFileManager tracks download requests, mapping from a download |
33 // ID (unique integer created in the IO thread) to the DownloadManager for the | 33 // ID (unique integer created in the IO thread) to the DownloadManager for the |
34 // tab (profile) where the download was initiated. In the event of a tab closure | 34 // tab (profile) where the download was initiated. In the event of a tab closure |
35 // during a download, the DownloadFileManager will continue to route data to the | 35 // during a download, the DownloadFileManager will continue to route data to the |
36 // appropriate DownloadManager. In progress downloads are cancelled for a | 36 // appropriate DownloadManager. In progress downloads are cancelled for a |
37 // DownloadManager that exits (such as when closing a profile). | 37 // DownloadManager that exits (such as when closing a profile). |
38 | 38 |
39 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ | 39 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ |
40 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ | 40 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ |
41 #pragma once | 41 #pragma once |
42 | 42 |
43 #include <map> | 43 #include <map> |
44 | 44 |
45 #include "base/basictypes.h" | 45 #include "base/basictypes.h" |
46 #include "base/gtest_prod_util.h" | 46 #include "base/gtest_prod_util.h" |
47 #include "base/hash_tables.h" | 47 #include "base/hash_tables.h" |
48 #include "base/memory/ref_counted.h" | 48 #include "base/memory/ref_counted.h" |
49 #include "base/timer.h" | 49 #include "base/timer.h" |
50 #include "chrome/browser/download/download_request_handle.h" | 50 #include "content/browser/download/download_request_handle.h" |
51 #include "ui/gfx/native_widget_types.h" | 51 #include "ui/gfx/native_widget_types.h" |
52 | 52 |
53 struct DownloadBuffer; | 53 struct DownloadBuffer; |
54 struct DownloadCreateInfo; | 54 struct DownloadCreateInfo; |
55 struct DownloadSaveInfo; | 55 struct DownloadSaveInfo; |
56 class DownloadFile; | 56 class DownloadFile; |
57 class DownloadManager; | 57 class DownloadManager; |
58 class FilePath; | 58 class FilePath; |
59 class GURL; | 59 class GURL; |
60 class ResourceDispatcherHost; | 60 class ResourceDispatcherHost; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // Schedule periodic updates of the download progress. This timer | 164 // Schedule periodic updates of the download progress. This timer |
165 // is controlled from the FILE thread, and posts updates to the UI thread. | 165 // is controlled from the FILE thread, and posts updates to the UI thread. |
166 base::RepeatingTimer<DownloadFileManager> update_timer_; | 166 base::RepeatingTimer<DownloadFileManager> update_timer_; |
167 | 167 |
168 ResourceDispatcherHost* resource_dispatcher_host_; | 168 ResourceDispatcherHost* resource_dispatcher_host_; |
169 | 169 |
170 DISALLOW_COPY_AND_ASSIGN(DownloadFileManager); | 170 DISALLOW_COPY_AND_ASSIGN(DownloadFileManager); |
171 }; | 171 }; |
172 | 172 |
173 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ | 173 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ |
OLD | NEW |