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

Unified Diff: content/browser/download/download_manager_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/drag_download_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 5b0319afd2ef8447ca6af4fb5ab80aaac2393c21..b03d7a727ecc80c9f485b031d53a19dcae2d742b 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -333,38 +333,6 @@ void DownloadManagerImpl::Shutdown() {
delegate_ = NULL;
}
-void DownloadManagerImpl::GetTemporaryDownloads(
- const FilePath& dir_path, DownloadVector* result) {
- DCHECK(result);
-
- for (DownloadMap::iterator it = downloads_.begin();
- it != downloads_.end(); ++it) {
- DownloadItemImpl* item = it->second;
- // TODO(benjhayden): Don't check IsPersisted().
- if (item->IsTemporary() &&
- item->IsPersisted() &&
- (dir_path.empty() ||
- item->GetTargetFilePath().DirName() == dir_path))
- result->push_back(item);
- }
-}
-
-void DownloadManagerImpl::GetAllDownloads(
- const FilePath& dir_path, DownloadVector* result) {
- DCHECK(result);
-
- for (DownloadMap::iterator it = downloads_.begin();
- it != downloads_.end(); ++it) {
- DownloadItemImpl* item = it->second;
- // TODO(benjhayden): Don't check IsPersisted().
- if (!item->IsTemporary() &&
- item->IsPersisted() &&
- (dir_path.empty() ||
- item->GetTargetFilePath().DirName() == dir_path))
- result->push_back(item);
- }
-}
-
void DownloadManagerImpl::SearchDownloads(const string16& query,
DownloadVector* result) {
string16 query_lower(base::i18n::ToLower(query));
@@ -982,6 +950,13 @@ DownloadItem* DownloadManagerImpl::GetDownload(int download_id) {
return ContainsKey(downloads_, download_id) ? downloads_[download_id] : NULL;
}
+void DownloadManagerImpl::GetAllDownloads(DownloadVector* downloads) {
+ for (DownloadMap::iterator it = downloads_.begin();
+ it != downloads_.end(); ++it) {
+ downloads->push_back(it->second);
+ }
+}
+
DownloadItem* DownloadManagerImpl::GetActiveDownloadItem(int download_id) {
if (ContainsKey(active_downloads_, download_id))
return active_downloads_[download_id];
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/drag_download_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698