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