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

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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Called when the DownloadManager is being destroyed to prevent Observers 97 // Called when the DownloadManager is being destroyed to prevent Observers
98 // from calling back to a stale pointer. 98 // from calling back to a stale pointer.
99 virtual void ManagerGoingDown(DownloadManager* manager) {} 99 virtual void ManagerGoingDown(DownloadManager* manager) {}
100 100
101 protected: 101 protected:
102 virtual ~Observer() {} 102 virtual ~Observer() {}
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 // Add all download items to |downloads|, no matter the type or state, without
108 // Otherwise, appends all temporary downloads that reside in |dir_path| to 108 // clearing |downloads| first.
109 // |*result|. 109 virtual void GetAllDownloads(DownloadVector* downloads) = 0;
110 virtual void GetTemporaryDownloads(const FilePath& dir_path,
111 DownloadVector* result) = 0;
112
113 // If |dir_path| is empty, appends all non-temporary downloads to |*result|.
114 // Otherwise, appends all non-temporary downloads that reside in |dir_path|
115 // to |*result|.
116 virtual void GetAllDownloads(const FilePath& dir_path,
117 DownloadVector* result) = 0;
118 110
119 // Returns all non-temporary downloads matching |query|. Empty query matches 111 // Returns all non-temporary downloads matching |query|. Empty query matches
120 // everything. 112 // everything.
121 virtual void SearchDownloads(const string16& query, 113 virtual void SearchDownloads(const string16& query,
122 DownloadVector* result) = 0; 114 DownloadVector* result) = 0;
123 115
124 // Returns true if initialized properly. 116 // Returns true if initialized properly.
125 virtual bool Init(BrowserContext* browser_context) = 0; 117 virtual bool Init(BrowserContext* browser_context) = 0;
126 118
127 // Called by a download source (Currently DownloadResourceHandler) 119 // Called by a download source (Currently DownloadResourceHandler)
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 protected: 215 protected:
224 virtual ~DownloadManager() {} 216 virtual ~DownloadManager() {}
225 217
226 private: 218 private:
227 friend class base::RefCountedThreadSafe<DownloadManager>; 219 friend class base::RefCountedThreadSafe<DownloadManager>;
228 }; 220 };
229 221
230 } // namespace content 222 } // namespace content
231 223
232 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ 224 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/download/drag_download_file.cc ('k') | content/public/test/download_test_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698