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

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: dfalcantara@ review changes 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..3c7e9fba92f79feea815d84a86e9fedca2920cf0 100644
--- a/chrome/browser/android/download/download_manager_service.cc
+++ b/chrome/browser/android/download/download_manager_service.cc
@@ -173,6 +173,12 @@ void DownloadManagerService::CheckForExternallyRemovedDownloads(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
bool is_off_the_record) {
+ // 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 (!is_history_query_complete_)
+ return;
+
content::DownloadManager* manager = GetDownloadManager(is_off_the_record);
if (!manager)
return;

Powered by Google App Engine
This is Rietveld 408576698