| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
| 6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
| 7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
| 8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 // Checks whether downloaded files still exist. Updates state of downloads | 164 // Checks whether downloaded files still exist. Updates state of downloads |
| 165 // that refer to removed files. The check runs in the background and may | 165 // that refer to removed files. The check runs in the background and may |
| 166 // finish asynchronously after this method returns. | 166 // finish asynchronously after this method returns. |
| 167 virtual void CheckForHistoryFilesRemoval() = 0; | 167 virtual void CheckForHistoryFilesRemoval() = 0; |
| 168 | 168 |
| 169 // Get the download item for |id| if present, no matter what type of download | 169 // Get the download item for |id| if present, no matter what type of download |
| 170 // it is or state it's in. | 170 // it is or state it's in. |
| 171 virtual DownloadItem* GetDownload(int id) = 0; | 171 virtual DownloadItem* GetDownload(int id) = 0; |
| 172 | 172 |
| 173 // Prohibits OpenDownload() from actually opening downloads for testing. | |
| 174 virtual void MockDownloadOpenForTesting() = 0; | |
| 175 | |
| 176 protected: | 173 protected: |
| 177 virtual ~DownloadManager() {} | 174 virtual ~DownloadManager() {} |
| 178 | 175 |
| 179 private: | 176 private: |
| 180 friend class base::RefCountedThreadSafe<DownloadManager>; | 177 friend class base::RefCountedThreadSafe<DownloadManager>; |
| 181 }; | 178 }; |
| 182 | 179 |
| 183 } // namespace content | 180 } // namespace content |
| 184 | 181 |
| 185 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 182 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |