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

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed)

Created:
9 years, 11 months ago by grt (UTC plus 2)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, amit, Paweł Hajdan Jr.
Visibility:
Public.

Description

More installer refactoring in the interest of fixing some bugs and cleaning things up: - Introduced ProductOperations: an interface implemented for each product that takes care of product-specific functions. Each Product owns an instance and delegates certain operations to it. - Removed the use of MasterPreferences by BrowserDistribution so that the former isn't needed outside of the installer. - Replaced PackageProperties with a new BrowserDistribution type (CHROME_BINARIES) - Plumbed the concept of InstallerState more thoroughly through installer - Removed ProductPackageMapping and Package - Moved more registry read ops into ProductState - Validation of products to be installed is now done in CheckPreInstallConditions - Ignore --chrome-frame --ready-mode if chrome is also being installed/updated and a SxS GCF is found (chrome is updated). - Migrates existing single-install Chrome to multi-install where appropriate. - Fixes update to Chrome's uninstallation arguments when Chrome Frame is uninstalled. - Removed dead code from install.cc. - Added code to update products' "ap" values when ready-mode is accepted. - Skip post-install things such as launching the browser when Chrome was implicitly added to the install/upgrade process by virtue of being part of a multi-install. BUG=61609 TEST=run the installer, see it work. existing tests in installer_util_unittests have been updated; new tests are included for ProductState, ChannelInfo, etc. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72497

Patch Set 1 #

Total comments: 49

Patch Set 2 : '' #

Total comments: 58

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 23

Patch Set 5 : '' #

Total comments: 11

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 2

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3342 lines, -2703 lines) Patch
M chrome/chrome_installer.gypi View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/chrome_installer_util.gypi View 1 2 3 4 5 6 7 5 chunks +11 lines, -4 lines 0 comments Download
M chrome/common/chrome_paths_win.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
M chrome/installer/setup/chrome_frame_ready_mode.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/installer/setup/chrome_frame_ready_mode.cc View 1 2 3 4 5 6 7 3 chunks +156 lines, -130 lines 0 comments Download
M chrome/installer/setup/install.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 3 4 5 6 7 17 chunks +53 lines, -195 lines 0 comments Download
M chrome/installer/setup/install_worker.h View 1 2 3 4 5 6 7 4 chunks +22 lines, -14 lines 0 comments Download
M chrome/installer/setup/install_worker.cc View 1 2 3 4 5 6 7 25 chunks +181 lines, -229 lines 0 comments Download
M chrome/installer/setup/install_worker_unittest.cc View 1 2 3 4 5 6 7 7 chunks +18 lines, -36 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 6 7 35 chunks +288 lines, -178 lines 0 comments Download
A chrome/installer/setup/setup_unittests.rc View 1 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/installer/setup/setup_unittests_resource.h View 1 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/installer/setup/setup_util.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/installer/setup/uninstall.cc View 1 2 3 4 5 6 7 23 chunks +116 lines, -93 lines 0 comments Download
M chrome/installer/util/browser_distribution.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -32 lines 0 comments Download
M chrome/installer/util/browser_distribution.cc View 1 2 3 4 5 6 7 5 chunks +41 lines, -51 lines 0 comments Download
M chrome/installer/util/browser_distribution_unittest.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -18 lines 0 comments Download
M chrome/installer/util/channel_info.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/installer/util/channel_info.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/installer/util/channel_info_unittest.cc View 1 2 3 4 5 6 7 2 chunks +36 lines, -0 lines 0 comments Download
A chrome/installer/util/chrome_browser_operations.h View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/installer/util/chrome_browser_operations.cc View 1 2 1 chunk +82 lines, -0 lines 0 comments Download
A chrome/installer/util/chrome_browser_sxs_operations.h View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/installer/util/chrome_browser_sxs_operations.cc View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M chrome/installer/util/chrome_frame_distribution.h View 1 2 3 4 5 6 7 1 chunk +1 line, -19 lines 0 comments Download
M chrome/installer/util/chrome_frame_distribution.cc View 1 2 3 4 5 6 7 3 chunks +2 lines, -92 lines 0 comments Download
A chrome/installer/util/chrome_frame_operations.h View 1 2 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/installer/util/chrome_frame_operations.cc View 1 2 3 4 5 1 chunk +148 lines, -0 lines 0 comments Download
A chrome/installer/util/chromium_binaries_distribution.h View 1 chunk +64 lines, -0 lines 0 comments Download
A chrome/installer/util/chromium_binaries_distribution.cc View 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/installer/util/google_chrome_binaries_distribution.h View 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/installer/util/google_chrome_binaries_distribution.cc View 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -12 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution_dummy.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -11 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution_unittest.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -5 lines 0 comments Download
M chrome/installer/util/google_chrome_sxs_distribution.h View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M chrome/installer/util/google_chrome_sxs_distribution.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/installer/util/google_update_settings.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/installer/util/google_update_settings.cc View 1 2 3 4 5 6 7 2 chunks +24 lines, -14 lines 0 comments Download
M chrome/installer/util/google_update_settings_unittest.cc View 1 2 3 4 5 6 7 3 chunks +24 lines, -20 lines 0 comments Download
M chrome/installer/util/helper.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -23 lines 0 comments Download
M chrome/installer/util/helper.cc View 1 2 3 4 5 6 7 2 chunks +17 lines, -90 lines 0 comments Download
D chrome/installer/util/helper_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -204 lines 0 comments Download
M chrome/installer/util/install_util.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/installer/util/install_util.cc View 1 2 3 4 5 6 7 2 chunks +24 lines, -2 lines 0 comments Download
M chrome/installer/util/install_util_unittest.cc View 1 2 3 4 5 6 7 4 chunks +36 lines, -11 lines 0 comments Download
M chrome/installer/util/installation_state.h View 1 2 3 4 5 6 7 4 chunks +52 lines, -25 lines 0 comments Download
M chrome/installer/util/installation_state.cc View 1 2 3 4 5 6 7 2 chunks +86 lines, -54 lines 0 comments Download
M chrome/installer/util/installer_state.h View 1 2 3 4 5 6 7 1 chunk +142 lines, -6 lines 0 comments Download
M chrome/installer/util/installer_state.cc View 1 2 3 4 5 6 7 4 chunks +369 lines, -16 lines 0 comments Download
A + chrome/installer/util/installer_state_unittest.cc View 1 2 6 chunks +175 lines, -52 lines 0 comments Download
D chrome/installer/util/package.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -90 lines 0 comments Download
D chrome/installer/util/package.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -188 lines 0 comments Download
D chrome/installer/util/package_properties.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -109 lines 0 comments Download
D chrome/installer/util/package_properties.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -94 lines 0 comments Download
D chrome/installer/util/package_properties_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -40 lines 0 comments Download
D chrome/installer/util/package_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -190 lines 0 comments Download
M chrome/installer/util/product.h View 1 2 3 4 5 6 7 5 chunks +45 lines, -77 lines 0 comments Download
M chrome/installer/util/product.cc View 1 2 3 4 5 6 7 3 chunks +44 lines, -145 lines 0 comments Download
A chrome/installer/util/product_operations.h View 1 2 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/installer/util/product_state_unittest.cc View 1 2 1 chunk +416 lines, -0 lines 0 comments Download
M chrome/installer/util/product_unittest.cc View 1 2 3 4 5 6 7 5 chunks +42 lines, -87 lines 0 comments Download
M chrome/installer/util/util_constants.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/installer/util/util_constants.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome_frame/ready_mode/ready_mode.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
grt (UTC plus 2)
Sending this out for early review. Stylistically, there are a number of things I'd like ...
9 years, 11 months ago (2011-01-20 06:07:51 UTC) #1
erikwright (departed)
The ready-mode bits LGTM. http://codereview.chromium.org/6288009/diff/1/chrome/installer/setup/chrome_frame_ready_mode.cc File chrome/installer/setup/chrome_frame_ready_mode.cc (right): http://codereview.chromium.org/6288009/diff/1/chrome/installer/setup/chrome_frame_ready_mode.cc#newcode72 chrome/installer/setup/chrome_frame_ready_mode.cc:72: // Add the two products ...
9 years, 11 months ago (2011-01-20 15:16:40 UTC) #2
robertshield
First batch: I've reviewed up to browser_distribution.h .. which doesn't seem like much. Carry on.. ...
9 years, 11 months ago (2011-01-20 22:06:06 UTC) #3
robertshield
Some more comments, getting there... http://codereview.chromium.org/6288009/diff/1/chrome/installer/util/channel_info.cc File chrome/installer/util/channel_info.cc (right): http://codereview.chromium.org/6288009/diff/1/chrome/installer/util/channel_info.cc#newcode156 chrome/installer/util/channel_info.cc:156: bool ChannelInfo::EqualsBaseOf(const ChannelInfo& other) ...
9 years, 11 months ago (2011-01-20 23:36:34 UTC) #4
grt (UTC plus 2)
I've backed out the chrome.exe renaming change, as I felt it had the potential to ...
9 years, 11 months ago (2011-01-21 05:27:51 UTC) #5
robertshield
More nits http://codereview.chromium.org/6288009/diff/56001/chrome/installer/util/installation_state.cc File chrome/installer/util/installation_state.cc (right): http://codereview.chromium.org/6288009/diff/56001/chrome/installer/util/installation_state.cc#newcode16 chrome/installer/util/installation_state.cc:16: const std::wstring& uninstall_arguments) { This looks non-trivial ...
9 years, 11 months ago (2011-01-21 16:58:56 UTC) #6
robertshield
Yay! Got to the end! http://codereview.chromium.org/6288009/diff/56001/chrome/installer/util/chrome_frame_operations.cc File chrome/installer/util/chrome_frame_operations.cc (right): http://codereview.chromium.org/6288009/diff/56001/chrome/installer/util/chrome_frame_operations.cc#newcode62 chrome/installer/util/chrome_frame_operations.cc:62: std::vector<FilePath>* key_files) { DCHECK(key_files); ...
9 years, 11 months ago (2011-01-21 19:37:46 UTC) #7
amit
lgtm as long as other reviewers are happy, Thanks!
9 years, 11 months ago (2011-01-21 20:01:49 UTC) #8
tommi (sloooow) - chröme
I'm up to installer_state_unittest.cc. Here's what I've got so far. http://codereview.chromium.org/6288009/diff/1/chrome/browser/first_run/first_run_win.cc File chrome/browser/first_run/first_run_win.cc (right): http://codereview.chromium.org/6288009/diff/1/chrome/browser/first_run/first_run_win.cc#newcode271 ...
9 years, 11 months ago (2011-01-21 21:45:16 UTC) #9
grt (UTC plus 2)
I've added some new unit tests, improved the implementation of InstallerState, added some new comments, ...
9 years, 11 months ago (2011-01-24 16:07:02 UTC) #10
grt (UTC plus 2)
I've unlocked two new levels: - Existing single Chrome installs are now migrated to multi. ...
9 years, 11 months ago (2011-01-24 19:26:05 UTC) #11
tommi (sloooow) - chröme
next batch of comments. excellent work. http://codereview.chromium.org/6288009/diff/56001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): http://codereview.chromium.org/6288009/diff/56001/chrome/installer/setup/install_worker.cc#newcode157 chrome/installer/setup/install_worker.cc:157: (installer_state.operation() != InstallerState::UNINSTALL)) ...
9 years, 11 months ago (2011-01-24 19:39:39 UTC) #12
tommi (sloooow) - chröme
which files were changed? (just so that I can be quicker with my feedback) On ...
9 years, 11 months ago (2011-01-24 19:40:49 UTC) #13
grt (UTC plus 2)
setup_main.cc relative to patch set 4, thanks. On Mon, Jan 24, 2011 at 2:40 PM, ...
9 years, 11 months ago (2011-01-24 20:03:07 UTC) #14
tommi (sloooow) - chröme
setup main looks good http://codereview.chromium.org/6288009/diff/23005/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): http://codereview.chromium.org/6288009/diff/23005/chrome/installer/setup/setup_main.cc#newcode280 chrome/installer/setup/setup_main.cc:280: // Fail if we're installing ...
9 years, 11 months ago (2011-01-24 20:25:44 UTC) #15
robertshield
LGTM. The code quality and coverage looks much improved, this is really great work. http://codereview.chromium.org/6288009/diff/23005/chrome/installer/setup/setup_main.cc ...
9 years, 11 months ago (2011-01-25 03:03:42 UTC) #16
grt (UTC plus 2)
Thanks for the comments. Updates are hitting the try servers. http://codereview.chromium.org/6288009/diff/56001/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): http://codereview.chromium.org/6288009/diff/56001/chrome/installer/setup/setup_main.cc#newcode286 ...
9 years, 11 months ago (2011-01-25 03:09:39 UTC) #17
grt (UTC plus 2)
Thanks for the great feedback and for keeping me honest. :-) http://codereview.chromium.org/6288009/diff/23005/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): ...
9 years, 11 months ago (2011-01-25 03:21:52 UTC) #18
grt (UTC plus 2)
Patch set 6 is green on the trybots. Patch set 7 contains no code changes ...
9 years, 11 months ago (2011-01-25 04:41:23 UTC) #19
tommi (sloooow) - chröme
http://codereview.chromium.org/6288009/diff/23005/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): http://codereview.chromium.org/6288009/diff/23005/chrome/installer/setup/setup_main.cc#newcode280 chrome/installer/setup/setup_main.cc:280: // Fail if we're installing Chrome Frame yet a ...
9 years, 11 months ago (2011-01-25 14:00:55 UTC) #20
tommi (sloooow) - chröme
LGTM. great! http://codereview.chromium.org/6288009/diff/110002/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): http://codereview.chromium.org/6288009/diff/110002/chrome/installer/setup/setup_main.cc#newcode228 chrome/installer/setup/setup_main.cc:228: VLOG(1) << "Skipping upgrade of single-install Chrome ...
9 years, 11 months ago (2011-01-25 14:24:35 UTC) #21
grt (UTC plus 2)
9 years, 11 months ago (2011-01-25 16:39:45 UTC) #22
Thanks.  I've sync'd to r72487 and am making a final pass through the trybots
before committing.

http://codereview.chromium.org/6288009/diff/107007/chrome/installer/util/inst...
File chrome/installer/util/installer_state.h (right):

http://codereview.chromium.org/6288009/diff/107007/chrome/installer/util/inst...
chrome/installer/util/installer_state.h:101: bool system_install() const {
return level_ == SYSTEM_LEVEL; }
On 2011/01/25 14:24:35, tommi wrote:
> I saw you added a DCHECK for is_multi_install() to check for valid
> post-initialization values - can you do the same for system_install()?

Done.

Powered by Google App Engine
This is Rietveld 408576698