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

Issue 2508503002: Fix an issue that temp files are left permanently on storage after chrome crash (Closed)

Created:
4 years, 1 month ago by qinmin
Modified:
4 years ago
Reviewers:
asanka, sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix an issue that temp files are left permanently on storage after chrome crash When download path is determined, Chrome will commit that information to history. However, the information is not committed immediately. As a result, if Chrome crashes before the next commit, the path information is lost. When resuming the download later, Chrome will generate a new target path. And the old temp file is left permanently on external storage. This might not be a big issue for desktop, as Chrome rarely gets killed and there are ample storage. However, this has a great impact on android. This CL requests the path information to be committed immediately to address the issue. BUG=664677 Committed: https://crrev.com/64558cd6c0e060c1f127f8f36f692529c8087aae Cr-Commit-Position: refs/heads/master@{#434738}

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressing comments and fix test #

Total comments: 6

Patch Set 3 : addressing comments #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -49 lines) Patch
M chrome/browser/download/download_history.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/download/download_history.cc View 1 2 3 chunks +45 lines, -21 lines 0 comments Download
M chrome/browser/download/download_history_unittest.cc View 1 2 23 chunks +50 lines, -21 lines 0 comments Download
M components/history/core/browser/history_backend.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/history_backend.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M components/history/core/browser/history_service.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/history_service.cc View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 45 (26 generated)
qinmin
PTAL
4 years, 1 month ago (2016-11-15 20:53:11 UTC) #6
asanka
Nit is optional but could you address the other two? LGTM with those addressed. https://codereview.chromium.org/2508503002/diff/1/chrome/browser/download/download_history.cc ...
4 years, 1 month ago (2016-11-16 23:15:57 UTC) #8
qinmin
https://codereview.chromium.org/2508503002/diff/1/chrome/browser/download/download_history.cc File chrome/browser/download/download_history.cc (right): https://codereview.chromium.org/2508503002/diff/1/chrome/browser/download/download_history.cc#newcode167 chrome/browser/download/download_history.cc:167: const history::DownloadRow& current) { On 2016/11/16 23:15:57, asanka wrote: ...
4 years, 1 month ago (2016-11-17 00:46:30 UTC) #9
asanka
New patchset? On 2016/11/17 at 00:46:30, qinmin wrote: > https://codereview.chromium.org/2508503002/diff/1/chrome/browser/download/download_history.cc > File chrome/browser/download/download_history.cc (right): > ...
4 years, 1 month ago (2016-11-17 15:08:55 UTC) #15
qinmin
Sorry, patchset is now uploaded. Found an issue with the current DownloadHistoryTest while uploading the ...
4 years, 1 month ago (2016-11-17 17:30:25 UTC) #16
qinmin
ping, asanka@, sky@, would you please take another look? Thanks
4 years, 1 month ago (2016-11-21 17:46:46 UTC) #21
sky
On 2016/11/21 17:46:46, qinmin wrote: > ping, asanka@, sky@, would you please take another look? ...
4 years, 1 month ago (2016-11-21 18:17:09 UTC) #22
qinmin
On 2016/11/21 18:17:09, sky wrote: > On 2016/11/21 17:46:46, qinmin wrote: > > ping, asanka@, ...
4 years, 1 month ago (2016-11-21 18:46:37 UTC) #23
sky
Can we update both of these things at once, and then continue the download? On ...
4 years, 1 month ago (2016-11-21 20:06:37 UTC) #24
asanka
LGTM with % comments. sky@ is correctly pointing out that there's a window during which ...
4 years, 1 month ago (2016-11-21 20:17:57 UTC) #25
sky
As this is the second attempt at fixing this, is there a way we could ...
4 years, 1 month ago (2016-11-21 22:23:47 UTC) #26
qinmin
Here are my 2 cents. So there are 2 things we need to commit immediately ...
4 years, 1 month ago (2016-11-21 22:54:40 UTC) #27
sky
Ok, LGTM
4 years, 1 month ago (2016-11-21 23:11:59 UTC) #28
qinmin
Also added TODO and linked to the crbug for the remaining issue https://codereview.chromium.org/2508503002/diff/60001/chrome/browser/download/download_history.cc File chrome/browser/download/download_history.cc ...
4 years, 1 month ago (2016-11-21 23:14:54 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2508503002/80001
4 years, 1 month ago (2016-11-22 16:56:08 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/277839) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 1 month ago (2016-11-22 17:00:11 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2508503002/100001
4 years ago (2016-11-28 20:12:39 UTC) #41
commit-bot: I haz the power
Committed patchset #4 (id:100001)
4 years ago (2016-11-28 22:30:58 UTC) #43
commit-bot: I haz the power
4 years ago (2016-11-28 22:32:49 UTC) #45
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/64558cd6c0e060c1f127f8f36f692529c8087aae
Cr-Commit-Position: refs/heads/master@{#434738}

Powered by Google App Engine
This is Rietveld 408576698