From 024f2f060ad0bdab9b0e8008973bde64bf04bd28 Mon Sep 17 00:00:00 2001 From: "georgey@chromium.org" Date: Fri, 30 Apr 2010 22:51:46 +0000 Subject: Fix for bug 37909: "Clear All" in incognito downloads window will clear all, including non-incognito downloads. BUG=37909 TEST=Open regular and incognito download pages. "Clear all" on incognito will clear all, but pending downloads. In regular window it would clear all, but pending and incognito. Review URL: http://codereview.chromium.org/1807007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46141 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/history/history_backend.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome/browser/history/history_backend.cc') diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 4be006a..caaec96 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -1040,6 +1040,15 @@ void HistoryBackend::QueryDownloads( request->ForwardResult(DownloadQueryRequest::TupleType(&request->value)); } +// Clean up entries that has been corrupted (because of the crash, for example). +void HistoryBackend::CleanUpInProgressEntries() { + if (db_.get()) { + // If some "in progress" entries were not updated when Chrome exited, they + // need to be cleaned up. + db_->CleanUpInProgressEntries(); + } +} + // Update a particular download entry. void HistoryBackend::UpdateDownload(int64 received_bytes, int32 state, -- cgit v1.1