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

Unified Diff: components/history/core/browser/history_service.cc

Issue 2508503002: Fix an issue that temp files are left permanently on storage after chrome crash (Closed)
Patch Set: addressing comments and fix test Created 4 years, 1 month 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
Index: components/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index a97677666b691d765a49bbc921453c2bdda7d277..13ffdf54bea0270d5f9d7944f5db53924142edc3 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -722,11 +722,14 @@ void HistoryService::QueryDownloads(const DownloadQueryCallback& callback) {
// Handle updates for a particular download. This is a 'fire and forget'
// operation, so we don't need to be called back.
-void HistoryService::UpdateDownload(const DownloadRow& data) {
+void HistoryService::UpdateDownload(
+ const DownloadRow& data,
+ bool should_commit_immediately) {
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
ScheduleTask(PRIORITY_NORMAL, base::Bind(&HistoryBackend::UpdateDownload,
- history_backend_, data));
+ history_backend_, data,
+ should_commit_immediately));
}
void HistoryService::RemoveDownloads(const std::set<uint32_t>& ids) {

Powered by Google App Engine
This is Rietveld 408576698