summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_manager.cc7
-rw-r--r--chrome/browser/download/download_manager.h6
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 04c6aeb..8d65eba 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1083,6 +1083,11 @@ int DownloadManager::RemoveDownloads(const base::Time remove_begin) {
return RemoveDownloadsBetween(remove_begin, base::Time());
}
+int DownloadManager::RemoveAllDownloads() {
+ // The null times make the date range unbounded.
+ return RemoveDownloadsBetween(base::Time(), base::Time());
+}
+
// Initiate a download of a specific URL. We send the request to the
// ResourceDispatcherHost, and let it send us responses like a regular
// download.
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h
index 5f73b22..378f2b4 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -355,6 +355,10 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
// deleted is returned back to the caller.
int RemoveDownloads(const base::Time remove_begin);
+ // Remove all downloads will delete all downloads. The number of downloads
+ // deleted is returned back to the caller.
+ int RemoveAllDownloads();
+
// Download the object at the URL. Used in cases such as "Save Link As..."
void DownloadUrl(const GURL& url,
const GURL& referrer,