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

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

Issue 10905215: Kill DownloadManager::SearchDownloads, DownloadItem::MatchesQuery (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
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Add all download items to |downloads|, no matter the type or state, without 107 // Add all download items to |downloads|, no matter the type or state, without
108 // clearing |downloads| first. 108 // clearing |downloads| first.
109 virtual void GetAllDownloads(DownloadVector* downloads) = 0; 109 virtual void GetAllDownloads(DownloadVector* downloads) = 0;
110 110
111 // Returns all non-temporary downloads matching |query|. Empty query matches
112 // everything.
113 virtual void SearchDownloads(const string16& query,
114 DownloadVector* result) = 0;
115
116 // Returns true if initialized properly. 111 // Returns true if initialized properly.
117 virtual bool Init(BrowserContext* browser_context) = 0; 112 virtual bool Init(BrowserContext* browser_context) = 0;
118 113
119 // Called by a download source (Currently DownloadResourceHandler) 114 // Called by a download source (Currently DownloadResourceHandler)
120 // to initiate the non-source portions of a download. 115 // to initiate the non-source portions of a download.
121 // Returns the id assigned to the download. If the DownloadCreateInfo 116 // Returns the id assigned to the download. If the DownloadCreateInfo
122 // specifies an id, that id will be used. 117 // specifies an id, that id will be used.
123 virtual DownloadId StartDownload( 118 virtual DownloadId StartDownload(
124 scoped_ptr<DownloadCreateInfo> info, 119 scoped_ptr<DownloadCreateInfo> info,
125 scoped_ptr<ByteStreamReader> stream) = 0; 120 scoped_ptr<ByteStreamReader> stream) = 0;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 protected: 208 protected:
214 virtual ~DownloadManager() {} 209 virtual ~DownloadManager() {}
215 210
216 private: 211 private:
217 friend class base::RefCountedThreadSafe<DownloadManager>; 212 friend class base::RefCountedThreadSafe<DownloadManager>;
218 }; 213 };
219 214
220 } // namespace content 215 } // namespace content
221 216
222 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ 217 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698