summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_history.cc
diff options
context:
space:
mode:
authorrdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-21 18:29:17 +0000
committerrdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-21 18:29:17 +0000
commit93af227f53bae5fda36dc44aafc5a4fc980bb8fc (patch)
tree80b097bf14dc30886e0dc54446856bd4caf8e437 /chrome/browser/download/download_history.cc
parent380aba8992ae92cd78486b0672ef748912032cf5 (diff)
downloadchromium_src-93af227f53bae5fda36dc44aafc5a4fc980bb8fc.zip
chromium_src-93af227f53bae5fda36dc44aafc5a4fc980bb8fc.tar.gz
chromium_src-93af227f53bae5fda36dc44aafc5a4fc980bb8fc.tar.bz2
Revert 102126 - Make cancel remove cancelled download from active queues at time of cancel.
Also add various tests required or enabled by this change. This changes two aspects of Cancel semantics (for downloads, not save page): a) Cancel can now be called anytime during the lifetime of a download, and b) if it is called before the history callback occurs, the download will be removed from the system (no where to store it persistently while waiting) BUG=85408 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101510 Review URL: http://codereview.chromium.org/7796014 TBR=rdsmith@chromium.org Review URL: http://codereview.chromium.org/7983037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_history.cc')
-rw-r--r--chrome/browser/download/download_history.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 9c9a26e..3da198b 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -116,14 +116,14 @@ void DownloadHistory::UpdateDownloadPath(DownloadItem* download_item,
hs->UpdateDownloadPath(new_path, download_item->db_handle());
}
-void DownloadHistory::RemoveEntry(int64 db_handle) {
+void DownloadHistory::RemoveEntry(DownloadItem* download_item) {
// No update necessary if the download was initiated while in incognito mode.
- if (db_handle <= DownloadItem::kUninitializedHandle)
+ if (download_item->db_handle() <= DownloadItem::kUninitializedHandle)
return;
HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
if (hs)
- hs->RemoveDownload(db_handle);
+ hs->RemoveDownload(download_item->db_handle());
}
void DownloadHistory::RemoveEntriesBetween(const base::Time remove_begin,