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

Issue 2333853002: Support --delete-old-versions in setup.exe. (Closed)

Created:
4 years, 3 months ago by fdoray
Modified:
4 years, 2 months ago
CC:
chromium-reviews, grt+watch_chromium.org, pennymac+watch_chromium.org, asvitkine+watch_chromium.org, wfh+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support --delete-old-versions in setup.exe. setup.exe --delete-old-versions repetitively attempts to delete all files that belong to old versions of Chrome. It exits when no files that belong to an old version of Chrome remain or when another process tries to acquire the SetupSingleton. setup.exe --delete-old-versions is launched in two occasions: - When the installer fails to delete old files after a not-in-use update. - When executables are successfully renamed on Chrome startup or shutdown. BUG=451546 Committed: https://crrev.com/1d37e596b979152e8f413dadb43de44cc41740d0 Cr-Commit-Position: refs/heads/master@{#422938}

Patch Set 1 #

Total comments: 23

Patch Set 2 : CR grt #3 #

Patch Set 3 : self-review #

Total comments: 6

Patch Set 4 : CR grt #5 #

Patch Set 5 : self-review #

Total comments: 6

Patch Set 6 : CR grt/rkaplow #8-9 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -15 lines) Patch
M chrome/installer/setup/install.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 2 chunks +49 lines, -3 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 5 chunks +86 lines, -8 lines 0 comments Download
M chrome/installer/setup/setup_singleton.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/installer/setup/setup_singleton.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/installer/util/util_constants.h View 1 2 3 2 chunks +16 lines, -1 line 0 comments Download
M chrome/installer/util/util_constants.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 2 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
fdoray
PTAL
4 years, 3 months ago (2016-09-12 20:45:23 UTC) #2
grt (UTC plus 2)
awesome! https://codereview.chromium.org/2333853002/diff/1/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://codereview.chromium.org/2333853002/diff/1/chrome/installer/setup/install.cc#newcode691 chrome/installer/setup/install.cc:691: !base::PathExists( rather than checking for new_chrome.exe again, you ...
4 years, 3 months ago (2016-09-13 08:10:41 UTC) #3
fdoray
PTAnL https://codereview.chromium.org/2333853002/diff/1/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://codereview.chromium.org/2333853002/diff/1/chrome/installer/setup/install.cc#newcode691 chrome/installer/setup/install.cc:691: !base::PathExists( On 2016/09/13 08:10:40, grt (UTC plus 2) ...
4 years, 3 months ago (2016-09-13 21:34:54 UTC) #4
grt (UTC plus 2)
looks good. please test with: - canary: --chrome-sxs - system-level chrome: --system-level - multi chrome: ...
4 years, 3 months ago (2016-09-14 10:42:11 UTC) #5
fdoray
grt@: PTAnL. It took me a while but I tested every regular and in-use update ...
4 years, 2 months ago (2016-09-27 19:42:16 UTC) #7
grt (UTC plus 2)
awesome, thanks. lgtm w/ a fix https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc#newcode431 chrome/installer/setup/setup_main.cc:431: base::Process::Current().SetProcessBackgrounded(was_backgrounded); if (was_backgrounded) ...
4 years, 2 months ago (2016-09-27 20:50:42 UTC) #8
rkaplow
lgtm https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc#newcode392 chrome/installer/setup/setup_main.cc:392: UMA_HISTOGRAM_COUNTS("Setup.Install.NumDeleteOldVersionsAttemptsBeforeAbort", nit, I've refactored the COUNT histograms which ...
4 years, 2 months ago (2016-09-28 14:31:30 UTC) #9
fdoray
https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc#newcode392 chrome/installer/setup/setup_main.cc:392: UMA_HISTOGRAM_COUNTS("Setup.Install.NumDeleteOldVersionsAttemptsBeforeAbort", On 2016/09/28 14:31:30, rkaplow wrote: > nit, I've ...
4 years, 2 months ago (2016-10-04 20:22:44 UTC) #12
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/2333853002/100001
4 years, 2 months ago (2016-10-04 20:23:40 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-04 21:36:34 UTC) #16
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/1d37e596b979152e8f413dadb43de44cc41740d0 Cr-Commit-Position: refs/heads/master@{#422938}
4 years, 2 months ago (2016-10-04 21:38:59 UTC) #18
grt (UTC plus 2)
https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/setup_main.cc#newcode431 chrome/installer/setup/setup_main.cc:431: base::Process::Current().SetProcessBackgrounded(was_backgrounded); On 2016/10/04 20:22:43, fdoray wrote: > On 2016/09/27 ...
4 years, 2 months ago (2016-10-05 08:17:33 UTC) #19
fdoray
4 years, 2 months ago (2016-10-05 12:19:25 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/...
File chrome/installer/setup/setup_main.cc (right):

https://codereview.chromium.org/2333853002/diff/80001/chrome/installer/setup/...
chrome/installer/setup/setup_main.cc:431:
base::Process::Current().SetProcessBackgrounded(was_backgrounded);
On 2016/10/05 08:17:33, grt (UTC plus 2) wrote:
> On 2016/10/04 20:22:43, fdoray wrote:
> > On 2016/09/27 20:50:42, grt (UTC plus 2) wrote:
> > > if (was_backgrounded)
> > >   base::Process::Current().SetProcessBackgrounded(false);
> > > no?
> > 
> > Done.
> > 
> > if (!was_backgrounded)
> 
> This is backwards in the same way it was before, no? The doc comment for
> SetProcessBackgrounded says it returns true if the process was backgrounded,
so
> you want to restore it to the foreground if was_backgrounded is set to true,
not
> false.

you're right. I wrongly assumed that SetProcessBackgrounded returned the
previous state (similar to
https://cs.chromium.org/chromium/src/base/threading/thread_restrictions.h?l=156)

Powered by Google App Engine
This is Rietveld 408576698