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

Issue 11412015: Copy setup when quick-enabling app host to user-level from system-level. (Closed)

Created:
8 years, 1 month ago by erikwright (departed)
Modified:
7 years, 11 months ago
Reviewers:
gab, grt (UTC plus 2)
CC:
chromium-reviews, grt+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Fix uninstallation of stand-alone user-level app launcher. setup.exe is required to be able to uninstall the launcher. So we need to copy it in during installation. Needed to extract the setup/archive deletion logic from the Binaries-specific steps too. BUG=158785, 151676 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174543

Patch Set 1 #

Patch Set 2 : Now with compilation. #

Total comments: 8

Patch Set 3 : Review feedback. #

Patch Set 4 : Delete setup when uninstalling app_host and leave setup when not uninstalling app_host. #

Patch Set 5 : Comments / move helpers to anonymous namespace. #

Total comments: 31

Patch Set 6 : Review comments. #

Patch Set 7 : Remove unused method. #

Total comments: 14

Patch Set 8 : review comments. #

Total comments: 18

Patch Set 9 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -58 lines) Patch
M chrome/installer/setup/install_worker.cc View 1 2 3 4 5 3 chunks +31 lines, -22 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/installer/setup/uninstall.h View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/installer/setup/uninstall.cc View 1 2 3 4 5 6 7 8 7 chunks +181 lines, -36 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
erikwright (departed)
gab: PTAL.
8 years, 1 month ago (2012-11-15 21:37:11 UTC) #1
grt (UTC plus 2)
https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc#newcode172 chrome/installer/setup/install_worker.cc:172: // We don't copy the archive when only App ...
8 years, 1 month ago (2012-11-16 04:38:26 UTC) #2
erikwright (departed)
Good question. app_host.exe, after delegating to a system-level Chrome, will run the system-level setup.exe (--app-host ...
8 years, 1 month ago (2012-11-16 11:39:30 UTC) #3
grt (UTC plus 2)
thanks. one more q and a suggestion. https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc#newcode165 chrome/installer/setup/install_worker.cc:165: FilePath archive_dst(installer_dir.Append(archive_path.BaseName())); ...
8 years, 1 month ago (2012-11-16 13:32:42 UTC) #4
erikwright (departed)
https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc#newcode174 chrome/installer/setup/install_worker.cc:174: if (installer_state.products().size() != 1 || On 2012/11/16 13:32:42, grt ...
8 years, 1 month ago (2012-11-16 13:58:33 UTC) #5
grt (UTC plus 2)
lgtm w/ the one code move nit. thanks. https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/11412015/diff/2002/chrome/installer/setup/install_worker.cc#newcode174 chrome/installer/setup/install_worker.cc:174: if ...
8 years, 1 month ago (2012-11-16 14:14:59 UTC) #6
gab
lgtm, +1 to grt's comments
8 years, 1 month ago (2012-11-16 21:40:08 UTC) #7
erikwright (departed)
gab/grt: PTAL. I realized that it wasn't enough just to copy the setup.exe over. 1) ...
8 years, 1 month ago (2012-11-20 20:14:30 UTC) #8
grt (UTC plus 2)
https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc (right): https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc#newcode244 chrome/installer/setup/uninstall.cc:244: // |remove_setup| is true. true -> false? https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc#newcode579 chrome/installer/setup/uninstall.cc:579: ...
8 years, 1 month ago (2012-11-21 20:40:26 UTC) #9
gab
Please update CL description.
8 years, 1 month ago (2012-11-21 21:36:25 UTC) #10
erikwright (departed)
https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc (right): https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc#newcode579 chrome/installer/setup/uninstall.cc:579: target_path, true, FileEnumerator::FILES | FileEnumerator::DIRECTORIES); On 2012/11/21 20:40:26, grt ...
8 years, 1 month ago (2012-11-21 21:51:10 UTC) #11
gab
This looks to me like the assumption that setup.exe belongs with the Chrome binaries was ...
8 years, 1 month ago (2012-11-21 22:55:55 UTC) #12
grt (UTC plus 2)
in the interest of speed, let's discuss in person tomorrow.
8 years, 1 month ago (2012-11-22 02:46:12 UTC) #13
erikwright (departed)
gab/grt: PTAL. https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc (right): https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc#newcode202 chrome/installer/setup/uninstall.cc:202: for (size_t i = 0; i < ...
8 years, 1 month ago (2012-11-23 18:54:13 UTC) #14
grt (UTC plus 2)
lg, just a nit, some comment suggestions, and a question or two. https://codereview.chromium.org/11412015/diff/14001/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc ...
8 years, 1 month ago (2012-11-23 21:00:55 UTC) #15
erikwright (departed)
PTAL. https://codereview.chromium.org/11412015/diff/14001/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc (right): https://codereview.chromium.org/11412015/diff/14001/chrome/installer/setup/uninstall.cc#newcode243 chrome/installer/setup/uninstall.cc:243: if (!remove_setup && to_delete.BaseName() == FilePath(installer::kSetupExe)) On 2012/11/23 ...
8 years ago (2012-11-29 07:40:36 UTC) #16
grt (UTC plus 2)
lgtm https://codereview.chromium.org/11412015/diff/14001/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc (right): https://codereview.chromium.org/11412015/diff/14001/chrome/installer/setup/uninstall.cc#newcode1353 chrome/installer/setup/uninstall.cc:1353: const FilePath setup_exe = cmd_line.GetProgram(); On 2012/11/29 07:40:36, ...
8 years ago (2012-11-30 13:40:30 UTC) #17
gab
Looks great, final comments below. https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc File chrome/installer/setup/uninstall.cc (right): https://codereview.chromium.org/11412015/diff/4003/chrome/installer/setup/uninstall.cc#newcode217 chrome/installer/setup/uninstall.cc:217: VLOG(1) << "Keeping setup.exe ...
8 years ago (2012-11-30 15:19:44 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikwright@chromium.org/11412015/15001
8 years ago (2012-12-21 21:34:41 UTC) #19
gab
Looks like you missed some of my last comments, mostly nits though so I'll let ...
8 years ago (2012-12-21 21:55:53 UTC) #20
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-22 01:04:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikwright@chromium.org/11412015/15001
8 years ago (2012-12-22 20:32:50 UTC) #22
commit-bot: I haz the power
Change committed as 174543
8 years ago (2012-12-23 03:07:15 UTC) #23
erikwright (departed)
7 years, 11 months ago (2013-01-04 20:07:50 UTC) #24
Message was sent while issue was closed.
Nits addressed in https://codereview.chromium.org/11776003/ .

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
File chrome/installer/setup/uninstall.cc (right):

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
chrome/installer/setup/uninstall.cc:209:
!installer_state.FindProduct(dist_type)) {
On 2012/12/21 21:55:53, gab wrote:
> On 2012/11/30 15:19:45, gab wrote:
> > Does !installer_state.FindProduct(dist_type) here mean that this product is
> not
> > part of the products currently being uninstalled? Maybe a comment would help
> > clarify the above condition.
> 
> Ping.

Done.

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
chrome/installer/setup/uninstall.cc:230: bool RemoveInstallerFiles(const
FilePath& install_directory,
On 2012/12/21 21:55:53, gab wrote:
> On 2012/11/30 15:19:45, gab wrote:
> > s/install_directory/installer_directory
> > 
> > imo, the install directory is the whole thing whereas the installer
directory
> is
> > what this is representing.
> 
> Ping.

Done.

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
chrome/installer/setup/uninstall.cc:248: VLOG(1) << "Deleting install path " <<
to_delete.value();
On 2012/12/21 21:55:53, gab wrote:
> On 2012/11/30 15:19:45, gab wrote:
> > s/install/installer (same comment as above).
> 
> Ping.

Done.

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
chrome/installer/setup/uninstall.cc:551: const FilePath& installer_path) {
On 2012/12/21 21:55:53, gab wrote:
> On 2012/11/30 15:19:45, gab wrote:
> > s/installer_path/setup_exe to respect naming convention around the installer
> > where *_path usually refers to a directory.
> > 
> > Or since you actually only need this to determine the installer_directory,
> might
> > as well take the installer_directory directly here.
> > 
> > (see my comment on lines 565 and 1315 as well for context)
> 
> Ping.

I chose not to change what is passed in, as that would imply a logic change on
line 564.

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
chrome/installer/setup/uninstall.cc:565: installer_directory =
installer_path.DirName();
On 2012/11/30 15:19:45, gab wrote:
> This feels weird, isn't this always expected to be true?
> 
> What about:
> DCHECK(target_path.IsParent(setup_exe));
> installer_directory = setup_exe.DirName();

Not necessarily. For example, if you execute the installer from your build
output.

I think this particular bit might have been the result of a f2f discussion with
Greg.

https://codereview.chromium.org/11412015/diff/7004/chrome/installer/setup/uni...
chrome/installer/setup/uninstall.cc:1315: installer_state,
cmd_line.GetProgram());
On 2012/12/21 21:55:53, gab wrote:
> On 2012/11/30 15:19:45, gab wrote:
> > cmd_line.GetProgram() could be relative path here.
> > 
> > This should be handled here or in DeleteChromeFilesAndFolders() imo.
> 
> Ping++

Done.

Powered by Google App Engine
This is Rietveld 408576698