| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 typedef std::vector<DownloadItem*> DownloadVector; | 105 typedef std::vector<DownloadItem*> DownloadVector; |
| 106 | 106 |
| 107 // If |dir_path| is empty, appends all temporary downloads to |*result|. | 107 // If |dir_path| is empty, appends all temporary downloads to |*result|. |
| 108 // Otherwise, appends all temporary downloads that reside in |dir_path| to | 108 // Otherwise, appends all temporary downloads that reside in |dir_path| to |
| 109 // |*result|. | 109 // |*result|. |
| 110 virtual void GetTemporaryDownloads(const FilePath& dir_path, | 110 virtual void GetTemporaryDownloads(const FilePath& dir_path, |
| 111 DownloadVector* result) = 0; | 111 DownloadVector* result) = 0; |
| 112 | 112 |
| 113 // If |dir_path| is empty, appends all non-temporary downloads to |*result|. | 113 // Add all download items to |downloads|, no matter the type or state, without |
| 114 // Otherwise, appends all non-temporary downloads that reside in |dir_path| | 114 // clearing |downloads| first. |
| 115 // to |*result|. | 115 virtual void GetAllDownloads(DownloadVector* downloads) = 0; |
| 116 virtual void GetAllDownloads(const FilePath& dir_path, | |
| 117 DownloadVector* result) = 0; | |
| 118 | 116 |
| 119 // Returns all non-temporary downloads matching |query|. Empty query matches | 117 // Returns all non-temporary downloads matching |query|. Empty query matches |
| 120 // everything. | 118 // everything. |
| 121 virtual void SearchDownloads(const string16& query, | 119 virtual void SearchDownloads(const string16& query, |
| 122 DownloadVector* result) = 0; | 120 DownloadVector* result) = 0; |
| 123 | 121 |
| 124 // Returns true if initialized properly. | 122 // Returns true if initialized properly. |
| 125 virtual bool Init(BrowserContext* browser_context) = 0; | 123 virtual bool Init(BrowserContext* browser_context) = 0; |
| 126 | 124 |
| 127 // Called by a download source (Currently DownloadResourceHandler) | 125 // Called by a download source (Currently DownloadResourceHandler) |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 protected: | 221 protected: |
| 224 virtual ~DownloadManager() {} | 222 virtual ~DownloadManager() {} |
| 225 | 223 |
| 226 private: | 224 private: |
| 227 friend class base::RefCountedThreadSafe<DownloadManager>; | 225 friend class base::RefCountedThreadSafe<DownloadManager>; |
| 228 }; | 226 }; |
| 229 | 227 |
| 230 } // namespace content | 228 } // namespace content |
| 231 | 229 |
| 232 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 230 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |