Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: content/public/browser/download_manager.h

Issue 10913015: Reland DownloadManager::GetAllDownloads actually does now (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698