New issue
Advanced search Search tips

Issue 602721 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: ----



Sign in to add a comment

Click "Replace File" on Download overwrite infobar doesn't remove the file

Project Member Reported by qin...@chromium.org, Apr 12 2016

Issue description

Precondition: 
Enable the flags in about://flags
Use system download manager when applicable: this should be changed to “DISABLED”

Easily reproducible:
1. Download a file once.
2. Download the file again, click replace file button when overwrite infobar comes up.

Now download will start, and the downloaded content will be saved to a temprary .crdownload file, and the original file is still there. Until the download finishes, the temporary file will replace the original downloaded file.


Although this works fine in most cases, but it has implications on android:
1. During the download process, it will take more sdcard space. And if user pauses the download, user may lose that memory space for quite some time.
2. It interferes with download pause/resumption. During resumption, chrome will check the target path again. And since the original file exists, that will cause the download to be cancelled.

So on Android we should remove the file when user click REPLACE FILE button
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0258fd32bb4bda3ab721d426c3c4a73177af861

commit c0258fd32bb4bda3ab721d426c3c4a73177af861
Author: qinmin <qinmin@chromium.org>
Date: Thu Apr 14 18:16:05 2016

Fix an issue that download file is not deleted when clicking Replace button

When enqueueing a file to Android DownloadManager, we delete the file if
user choose to overwrite.
But when using Chrome's network stack, we didn't remove the file.
This will reduce user's sdcard space during download.
And it also causes issues when user try to resume the download.
This CL deletes the file when user clicks the "Replace File" button.

BUG= 602721 

Review URL: https://codereview.chromium.org/1884783002

Cr-Commit-Position: refs/heads/master@{#387368}

[modify] https://crrev.com/c0258fd32bb4bda3ab721d426c3c4a73177af861/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc

Comment 2 by qin...@chromium.org, Apr 14 2016

Labels: Merge-Request-51
Status: Started (was: Unconfirmed)

Comment 3 by tin...@google.com, Apr 14 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 14 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3fbb31663558ab79ed42d101bd0cb8587c5cea3

commit d3fbb31663558ab79ed42d101bd0cb8587c5cea3
Author: Min Qin <qinmin@chromium.org>
Date: Thu Apr 14 19:25:23 2016

Fix an issue that download file is not deleted when clicking Replace button

When enqueueing a file to Android DownloadManager, we delete the file if
user choose to overwrite.
But when using Chrome's network stack, we didn't remove the file.
This will reduce user's sdcard space during download.
And it also causes issues when user try to resume the download.
This CL deletes the file when user clicks the "Replace File" button.

TBR=yfriedman@chromium.org
BUG= 602721 

Review URL: https://codereview.chromium.org/1884783002

Cr-Commit-Position: refs/heads/master@{#387368}
(cherry picked from commit c0258fd32bb4bda3ab721d426c3c4a73177af861)

Review URL: https://codereview.chromium.org/1882413004 .

Cr-Commit-Position: refs/branch-heads/2704@{#57}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/d3fbb31663558ab79ed42d101bd0cb8587c5cea3/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc

Comment 5 by qin...@chromium.org, Apr 28 2016

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
This issue is now not reproducible on latest M51-51.0.2704.36 build, previous file is getting removed as soon as we click on Replace.
Verified on Moto G2/LXB22 and Nexus 7/MRA58V

Sign in to add a comment