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

Unified Diff: chrome/browser/android/download/download_manager_service.cc

Issue 2271913002: [Downloads] Remove externally deleted items from downloads history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Downloads] Remove externally deleted items from downloads history Created 4 years, 4 months 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: chrome/browser/android/download/download_manager_service.cc
diff --git a/chrome/browser/android/download/download_manager_service.cc b/chrome/browser/android/download/download_manager_service.cc
index 18eb7dd085503fc5f657d406ea21881c3990753e..2b60ad549fea79ca9781a57fe77b248ebad2ac55 100644
--- a/chrome/browser/android/download/download_manager_service.cc
+++ b/chrome/browser/android/download/download_manager_service.cc
@@ -174,7 +174,11 @@ void DownloadManagerService::CheckForExternallyRemovedDownloads(
const JavaParamRef<jobject>& obj,
bool is_off_the_record) {
content::DownloadManager* manager = GetDownloadManager(is_off_the_record);
- if (!manager)
+
+ // Once the history query is complete, download_history.cc will check for the
+ // removal of history files. If the history query is not yet complete, ignore
+ // requests to check for externally removed downloads.
+ if (!manager || !is_history_query_complete_)
qinmin 2016/08/24 16:30:53 Nit: there is no need to get the manager if is_his
Theresa 2016/08/24 22:52:09 Done.
return;
manager->CheckForHistoryFilesRemoval();
}

Powered by Google App Engine
This is Rietveld 408576698