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

Issue 1666363002: Delete old files after an update. (Closed)

Created:
4 years, 10 months ago by fdoray
Modified:
4 years, 9 months ago
Reviewers:
grt (UTC plus 2)
CC:
chromium-reviews, grt+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Delete old files after an update. This CL introduces a WorkItem which deletes old executables and version directories from the Chrome installation directory. For now, the WorkItem is used at the end of an update and at the end of a new_chrome.exe->chrome.exe rename. Eventually, it will also be invoked repetitively from a cleanup process launched when the WorkItem fails to delete everything the first time. BUG=451546 Committed: https://crrev.com/1b50c70773051b24925b46bab8b006e606633c5c Cr-Commit-Position: refs/heads/master@{#378802}

Patch Set 1 #

Total comments: 39

Patch Set 2 : address comments from grt #

Patch Set 3 : address comments from grt #

Patch Set 4 : self-review #

Patch Set 5 : self-review #

Patch Set 6 : self-review #

Total comments: 32

Patch Set 7 : address comments from grt #8 and rebase #

Patch Set 8 : self-review #

Patch Set 9 : self-review #

Total comments: 8

Patch Set 10 : address comments from grt #11 #

Total comments: 2

Patch Set 11 : fix return type #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -442 lines) Patch
M chrome/chrome_installer.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_installer_util.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 3 4 5 6 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/installer/setup/install_worker.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/installer/util/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/installer/util/delete_old_versions.h View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/installer/util/delete_old_versions.cc View 1 2 3 4 5 6 7 8 9 1 chunk +277 lines, -0 lines 1 comment Download
A chrome/installer/util/delete_old_versions_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +286 lines, -0 lines 0 comments Download
M chrome/installer/util/installer_state.h View 1 2 3 4 3 chunks +0 lines, -13 lines 0 comments Download
M chrome/installer/util/installer_state.cc View 1 2 chunks +0 lines, -65 lines 0 comments Download
M chrome/installer/util/installer_state_unittest.cc View 1 2 3 4 4 chunks +0 lines, -353 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
fdoray
Can you review this CL? I think that having a "bool success" is simpler than ...
4 years, 10 months ago (2016-02-04 22:07:08 UTC) #2
fdoray
https://codereview.chromium.org/1666363002/diff/1/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://codereview.chromium.org/1666363002/diff/1/chrome/installer/setup/install_worker.cc#newcode1023 chrome/installer/setup/install_worker.cc:1023: &DeleteOldVersionsCallback, installer_state.target_path())); Note to myself: I've just seen that ...
4 years, 10 months ago (2016-02-05 22:56:41 UTC) #3
grt (UTC plus 2)
Can the old RemoveOldVersionDirectories simply be removed? What you're building here seems to be a ...
4 years, 10 months ago (2016-02-10 20:02:04 UTC) #4
fdoray
grt@: Can you take another look? Thanks. https://codereview.chromium.org/1666363002/diff/1/chrome/installer/util/delete_old_versions.cc File chrome/installer/util/delete_old_versions.cc (right): https://codereview.chromium.org/1666363002/diff/1/chrome/installer/util/delete_old_versions.cc#newcode46 chrome/installer/util/delete_old_versions.cc:46: const base::string16 ...
4 years, 10 months ago (2016-02-18 17:59:21 UTC) #7
grt (UTC plus 2)
https://codereview.chromium.org/1666363002/diff/100001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://codereview.chromium.org/1666363002/diff/100001/chrome/installer/setup/install.cc#newcode557 chrome/installer/setup/install.cc:557: installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); move this to the new place where old ...
4 years, 10 months ago (2016-02-24 20:06:17 UTC) #8
fdoray
grt@: Can you take another look? Thanks. https://codereview.chromium.org/1666363002/diff/100001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://codereview.chromium.org/1666363002/diff/100001/chrome/installer/setup/install.cc#newcode557 chrome/installer/setup/install.cc:557: installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); On ...
4 years, 10 months ago (2016-02-25 18:26:48 UTC) #10
grt (UTC plus 2)
looks great https://codereview.chromium.org/1666363002/diff/160001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://codereview.chromium.org/1666363002/diff/160001/chrome/installer/setup/install_worker.cc#newcode1020 chrome/installer/setup/install_worker.cc:1020: ->set_ignore_failure(true); is it reasonable to do this ...
4 years, 10 months ago (2016-02-25 19:25:40 UTC) #11
fdoray
grt@: Can you take another look? Thanks. https://codereview.chromium.org/1666363002/diff/160001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://codereview.chromium.org/1666363002/diff/160001/chrome/installer/setup/install_worker.cc#newcode1020 chrome/installer/setup/install_worker.cc:1020: ->set_ignore_failure(true); On ...
4 years, 10 months ago (2016-02-26 17:00:05 UTC) #12
grt (UTC plus 2)
lgtm w/ a nit. https://codereview.chromium.org/1666363002/diff/180001/chrome/installer/util/delete_old_versions_unittest.cc File chrome/installer/util/delete_old_versions_unittest.cc (right): https://codereview.chromium.org/1666363002/diff/180001/chrome/installer/util/delete_old_versions_unittest.cc#newcode50 chrome/installer/util/delete_old_versions_unittest.cc:50: bool DeleteOldVersions() { void?
4 years, 9 months ago (2016-02-29 21:43:18 UTC) #13
fdoray
https://codereview.chromium.org/1666363002/diff/180001/chrome/installer/util/delete_old_versions_unittest.cc File chrome/installer/util/delete_old_versions_unittest.cc (right): https://codereview.chromium.org/1666363002/diff/180001/chrome/installer/util/delete_old_versions_unittest.cc#newcode50 chrome/installer/util/delete_old_versions_unittest.cc:50: bool DeleteOldVersions() { On 2016/02/29 21:43:18, grt (no reviews ...
4 years, 9 months ago (2016-03-02 18:44:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1666363002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1666363002/200001
4 years, 9 months ago (2016-03-02 18:45:43 UTC) #17
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 9 months ago (2016-03-02 19:36:03 UTC) #19
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/1b50c70773051b24925b46bab8b006e606633c5c Cr-Commit-Position: refs/heads/master@{#378802}
4 years, 9 months ago (2016-03-02 19:37:06 UTC) #21
benwells
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/1764053002/ by benwells@chromium.org. ...
4 years, 9 months ago (2016-03-04 05:54:35 UTC) #22
grt (UTC plus 2)
4 years, 9 months ago (2016-03-07 15:08:32 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/1666363002/diff/200001/chrome/installer/util/...
File chrome/installer/util/delete_old_versions.cc (right):

https://codereview.chromium.org/1666363002/diff/200001/chrome/installer/util/...
chrome/installer/util/delete_old_versions.cc:260: return
DeleteOldVersions(installer_state.target_path());
ah, this is a problem here. when a WorkItem's ignore_failure bit is set, it
should unconditionally return true. i think the right fix is to change
CallbackWorkItem::Do so that it does something like:
  return ignore_failure() ? true : result;

Powered by Google App Engine
This is Rietveld 408576698