Chromium Code Reviews| Index: content/browser/download/download_manager_impl.h |
| diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h |
| index 9c9d12deec392ed29fd7bfc6de1bf0d674214022..6537594ccae6aa00eea125d1fe816e3e4cfea622 100644 |
| --- a/content/browser/download/download_manager_impl.h |
| +++ b/content/browser/download/download_manager_impl.h |
| @@ -9,6 +9,7 @@ |
| #include <set> |
| #include <string> |
| +#include "base/callback.h" |
|
Randy Smith (Not in Mondays)
2015/08/05 16:02:04
nit, suggestion: I think this could be callback_fo
Timo Reimann
2015/08/05 20:07:46
Nice, didn't know about callback_foward.h.
Done.
|
| #include "base/containers/hash_tables.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| @@ -66,6 +67,10 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, |
| scoped_ptr<DownloadCreateInfo> info, |
| scoped_ptr<ByteStreamReader> stream, |
| const DownloadUrlParameters::OnStartedCallback& on_started) override; |
| + |
| + int RemoveDownloadsByOriginAndTime(const url::Origin& origin, |
| + base::Time remove_begin, |
| + base::Time remove_end) override; |
| int RemoveDownloadsBetween(base::Time remove_begin, |
| base::Time remove_end) override; |
| int RemoveDownloads(base::Time remove_begin) override; |
| @@ -108,6 +113,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, |
| typedef std::set<DownloadItem*> DownloadSet; |
| typedef base::hash_map<uint32, DownloadItemImpl*> DownloadMap; |
| typedef std::vector<DownloadItemImpl*> DownloadItemImplVector; |
| + typedef base::Callback<bool(const DownloadItemImpl*)> DownloadRemover; |
| // For testing. |
| friend class DownloadManagerTest; |
| @@ -142,6 +148,9 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, |
| // observer. |
| void OnFileExistenceChecked(uint32 download_id, bool result); |
| + // Remove all downloads for which |remover| returns true. |
| + int RemoveDownloads(const DownloadRemover& remover); |
| + |
| // Overridden from DownloadItemImplDelegate |
| // (Note that |GetBrowserContext| are present in both interfaces.) |
| void DetermineDownloadTarget(DownloadItemImpl* item, |