Android Download: Fix an issue that Chrome removes external renamed file.

When user downloads a file in Chrome and remove the file in other
application, we check if the file is externally removed and call
Android API DownloadManager.remove(id) to avoid a crash on Android.

However, if the user rename the file, currently Chrome still deletes it
via the id provided by Android DownloadManager.

In this CL, we only let Android remove the file if it's deleted in

(cherry picked from commit 88276e189cc40e61a2f60fffd2b7a49b63af6695)

Bug: 774870
Change-Id: I5448a155c1e05e44ec3a812e93d3035d7061ecf7
Reviewed-by: Min Qin <>
Reviewed-by: David Trainor <>
Commit-Queue: Xing Liu <>
Cr-Original-Commit-Position: refs/heads/master@{#534738}
Reviewed-by: Xing Liu <>
Cr-Commit-Position: refs/branch-heads/3325@{#544}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
5 files changed