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

Issue 10823437: Callback flow to register Chrome and update shortcuts after OS upgrade to Windows 8 (Closed)

Created:
8 years, 4 months ago by huangs
Modified:
8 years, 3 months ago
CC:
chromium-reviews, grt+watch_chromium.org, chrome-win8-eng_google.com
Visibility:
Public.

Description

Callback flow to register Chrome and update shortcuts after OS upgrade to Windows 8 There are 2 parts to this CL: 1. Added --on-os-upgrade switch to setup.exe, which when invoked, executes ChromeBrowserOnOsUpgrade(), which registers Chrome and updates shortcuts, so that Metro Chrome would work in Windows. 2. During Chrome install, creates the registry key HK??\Software\Google\Update\Clients\{Chrome GUID}\Commands\on-os-upgrade containing CommandLine: ...\setup.exe --on-os-upgrade ... AutoRunOnOSUpgrade: 1 This is detected by Google Update, so that the command is executed when user logs in for the first time after OS upgrade. BUG=127544 TEST= 1. In Windows 7 / Vista, install Chrome. 2. (Verify that the registry key exists). 3. Upgrade to Windows 8, while *keeping apps and settings* (this option may be unavailable for some versions of Windows). 4. After update, command line should be called automatically, and Metro Chrome should work. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154630

Patch Set 1 #

Total comments: 16

Patch Set 2 : Response to review. However, additional major changes will follow. #

Patch Set 3 : Reimplementing registry changes using AppCommand; adding checks in InstallationValidator. #

Total comments: 70

Patch Set 4 : Refactoring AppCommand constructor; replacing std::wstring with string16. #

Patch Set 5 : Abandoning the use of ON_OS_UPGRADE_SUCCESSFUL installer message. #

Total comments: 87

Patch Set 6 : Refactoring; renamed OnOsUpgrade() to HandleOsUpgradeForBrowser(). #

Total comments: 18

Patch Set 7 : Refactoring; changing return value of --on-os-upgrade flow. #

Total comments: 15

Patch Set 8 : Refactoring and nits. #

Total comments: 12

Patch Set 9 : Supplying mock data for unit tests; refactoring. #

Total comments: 4

Patch Set 10 : Renaming kRegAutoRunOnOSUpgrade to kRegAutoRunOnOSUpgradeField; deleting bad debug message. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -96 lines) Patch
M chrome/installer/setup/install.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/installer/setup/install_worker.h View 1 2 3 4 5 6 4 chunks +14 lines, -3 lines 0 comments Download
M chrome/installer/setup/install_worker.cc View 1 2 3 4 5 6 7 8 9 25 chunks +69 lines, -25 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/installer/setup/uninstall.cc View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/installer/util/app_command.h View 1 2 3 4 5 4 chunks +14 lines, -7 lines 0 comments Download
M chrome/installer/util/app_command.cc View 1 2 3 4 5 6 7 8 9 3 chunks +60 lines, -34 lines 0 comments Download
M chrome/installer/util/google_update_constants.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/installer/util/google_update_constants.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/installer/util/installation_validator.h View 1 2 3 4 5 4 chunks +19 lines, -4 lines 0 comments Download
M chrome/installer/util/installation_validator.cc View 1 2 3 4 5 6 chunks +52 lines, -19 lines 0 comments Download
M chrome/installer/util/installation_validator_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +42 lines, -4 lines 0 comments Download
M chrome/installer/util/util_constants.h View 1 2 3 4 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/installer/util/util_constants.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (0 generated)
huangs
Code-complete, although some testing is needed.
8 years, 4 months ago (2012-08-21 20:02:22 UTC) #1
grt (UTC plus 2)
some drive-by comments. looks good overall. https://chromiumcodereview.appspot.com/10823437/diff/1/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/1/chrome/installer/setup/install.cc#newcode555 chrome/installer/setup/install.cc:555: InstallStatus OnOsUpgrade(const InstallationState& ...
8 years, 4 months ago (2012-08-21 20:32:55 UTC) #2
grt (UTC plus 2)
Also, please update the CL description so that it includes a nice description of the ...
8 years, 4 months ago (2012-08-21 20:35:20 UTC) #3
gab
On 2012/08/21 20:35:20, grt wrote: > Also, please update the CL description so that it ...
8 years, 4 months ago (2012-08-21 20:42:33 UTC) #4
gab
On 2012/08/21 20:42:33, gab wrote: > On 2012/08/21 20:35:20, grt wrote: > > Also, please ...
8 years, 4 months ago (2012-08-21 20:47:20 UTC) #5
grt (UTC plus 2)
On 2012/08/21 20:47:20, gab wrote: > Also, in general, don't put 3 reviewers simultaneously. In ...
8 years, 4 months ago (2012-08-21 21:05:47 UTC) #6
gab
On 2012/08/21 21:05:47, grt wrote: > On 2012/08/21 20:47:20, gab wrote: > > Also, in ...
8 years, 4 months ago (2012-08-21 21:12:22 UTC) #7
gab
On 2012/08/21 21:12:22, gab wrote: > On 2012/08/21 21:05:47, grt wrote: > > On 2012/08/21 ...
8 years, 4 months ago (2012-08-21 21:14:21 UTC) #8
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
8 years, 4 months ago (2012-08-21 21:40:44 UTC) #9
huangs
https://chromiumcodereview.appspot.com/10823437/diff/1/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/1/chrome/installer/setup/install.cc#newcode555 chrome/installer/setup/install.cc:555: InstallStatus OnOsUpgrade(const InstallationState& original_state, On 2012/08/21 20:32:55, grt wrote: ...
8 years, 4 months ago (2012-08-21 22:00:43 UTC) #10
huangs
Please take another look.
8 years, 3 months ago (2012-08-27 20:56:44 UTC) #11
gab
Looking good! Comments inline. Cheers, Gab https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/install.cc#newcode557 chrome/installer/setup/install.cc:557: const CommandLine& cmd_line) ...
8 years, 3 months ago (2012-08-28 16:08:19 UTC) #12
gab
Clarifying one comment. https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/util/installation_validator.h File chrome/installer/util/installation_validator.h (right): https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/util/installation_validator.h#newcode204 chrome/installer/util/installation_validator.h:204: machine_state(machine_state), On 2012/08/28 16:08:19, gab wrote: ...
8 years, 3 months ago (2012-08-28 17:48:09 UTC) #13
grt (UTC plus 2)
lookin' pretty good. comments below. https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/install.cc#newcode580 chrome/installer/setup/install.cc:580: return installer::ON_OS_UPGRADE_SUCCESSFUL; On 2012/08/28 ...
8 years, 3 months ago (2012-08-28 19:35:39 UTC) #14
gab
comment on grt's comment https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/setup_main.cc File chrome/installer/setup/setup_main.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/setup_main.cc#newcode1229 chrome/installer/setup/setup_main.cc:1229: } else if (cmd_line.HasSwitch(installer::switches::kOnOsUpgrade)) { ...
8 years, 3 months ago (2012-08-29 03:23:48 UTC) #15
huangs
Please take another look! Please note that: - work_item_list.* are no longer changed. - In ...
8 years, 3 months ago (2012-08-29 17:02:54 UTC) #16
grt (UTC plus 2)
one quick comment for now. i'll review the rest once this is incorporated. https://chromiumcodereview.appspot.com/10823437/diff/18001/chrome/installer/setup/install.cc File ...
8 years, 3 months ago (2012-08-29 17:39:21 UTC) #17
huangs
On 2012/08/29 17:39:21, grt wrote: > one quick comment for now. i'll review the rest ...
8 years, 3 months ago (2012-08-29 17:45:00 UTC) #18
huangs
Please review the updated version.
8 years, 3 months ago (2012-08-29 20:35:10 UTC) #19
grt (UTC plus 2)
next round https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install.cc#newcode560 chrome/installer/setup/install.cc:560: DCHECK(chrome_install); if (!chrome_install) { NOTREACHED(); return false; ...
8 years, 3 months ago (2012-08-30 04:15:25 UTC) #20
gab
looks great! more comments below. https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install.cc#newcode572 chrome/installer/setup/install.cc:572: SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); ...
8 years, 3 months ago (2012-08-30 14:24:31 UTC) #21
grt (UTC plus 2)
https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install_worker.cc#newcode1620 chrome/installer/setup/install_worker.cc:1620: .GetInstallerDirectory(*new_version).Append(setup_path->BaseName())); On 2012/08/30 14:24:32, gab wrote: > s/setup_path->BaseName()/installer::kSetupExe > ...
8 years, 3 months ago (2012-08-30 17:06:08 UTC) #22
huangs
Please take another look. https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install.cc#newcode560 chrome/installer/setup/install.cc:560: DCHECK(chrome_install); On 2012/08/30 04:15:25, grt ...
8 years, 3 months ago (2012-08-30 17:13:07 UTC) #23
gab
Just expressing opinion, no changes required! https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install_worker.cc#newcode1620 chrome/installer/setup/install_worker.cc:1620: .GetInstallerDirectory(*new_version).Append(setup_path->BaseName())); On 2012/08/30 ...
8 years, 3 months ago (2012-08-30 17:15:50 UTC) #24
gab
almost there! Cheers! Gab https://chromiumcodereview.appspot.com/10823437/diff/31004/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/31004/chrome/installer/setup/install.cc#newcode555 chrome/installer/setup/install.cc:555: bool HandleOsUpgradeForBrowser(const InstallerState& installer_state, I ...
8 years, 3 months ago (2012-08-30 17:55:19 UTC) #25
grt (UTC plus 2)
almost there! https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/30001/chrome/installer/setup/install_worker.cc#newcode469 chrome/installer/setup/install_worker.cc:469: const string16& brand(chrome_product_state->brand()); On 2012/08/30 14:24:32, gab ...
8 years, 3 months ago (2012-08-30 19:10:17 UTC) #26
huangs
Please check again! https://chromiumcodereview.appspot.com/10823437/diff/31004/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/31004/chrome/installer/setup/install.cc#newcode555 chrome/installer/setup/install.cc:555: bool HandleOsUpgradeForBrowser(const InstallerState& installer_state, On 2012/08/30 ...
8 years, 3 months ago (2012-08-30 20:14:22 UTC) #27
gab
Looking great, couple nits, and one thing that just won't work (i.e. the way you ...
8 years, 3 months ago (2012-08-30 20:26:27 UTC) #28
huangs
Please check again! https://chromiumcodereview.appspot.com/10823437/diff/40004/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/40004/chrome/installer/setup/install.cc#newcode264 chrome/installer/setup/install.cc:264: bool is_successful = true; On 2012/08/30 ...
8 years, 3 months ago (2012-08-30 20:46:31 UTC) #29
gab
LGTM++ /w nit I know you're gone and this is just a style nit. If ...
8 years, 3 months ago (2012-08-30 20:51:07 UTC) #30
gab
One more comment (which makes this not commitable as is imo :(...) https://chromiumcodereview.appspot.com/10823437/diff/38005/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc ...
8 years, 3 months ago (2012-08-30 21:12:03 UTC) #31
huangs
Doh! So we check the return values of all the ShellUtil:: calls?
8 years, 3 months ago (2012-08-30 21:30:44 UTC) #32
gab
On 2012/08/30 21:30:44, huangs1 wrote: > Doh! So we check the return values of all ...
8 years, 3 months ago (2012-08-30 21:32:45 UTC) #33
grt (UTC plus 2)
@gab: please have a look at my comment regarding returning bool from the shortcut funcs ...
8 years, 3 months ago (2012-08-31 00:41:36 UTC) #34
gab
Ah right, let's go with the void solution for now. Actually, now that I think ...
8 years, 3 months ago (2012-08-31 01:31:05 UTC) #35
robertshield
https://chromiumcodereview.appspot.com/10823437/diff/38005/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/38005/chrome/installer/setup/install.cc#newcode423 chrome/installer/setup/install.cc:423: return true; On 2012/08/30 21:12:03, gab wrote: > A ...
8 years, 3 months ago (2012-08-31 02:24:17 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/huangs@chromium.org/10823437/38005
8 years, 3 months ago (2012-08-31 14:18:13 UTC) #37
commit-bot: I haz the power
Try job failure for 10823437-38005 (retry) on win_rel for step "installer_util_unittests". It's a second try, ...
8 years, 3 months ago (2012-08-31 18:19:38 UTC) #38
huangs
trybot failed unit test because I didn't supply new mock data. That should be fixed. ...
8 years, 3 months ago (2012-08-31 20:50:17 UTC) #39
grt (UTC plus 2)
lgtm on the condition that you either land this as-is and address these two comments ...
8 years, 3 months ago (2012-09-01 01:30:23 UTC) #40
gab
lgtm, +1 to greg's comment.
8 years, 3 months ago (2012-09-01 21:17:19 UTC) #41
huangs
Made exactly the changes requested. Going to submit soon! https://chromiumcodereview.appspot.com/10823437/diff/38024/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/10823437/diff/38024/chrome/installer/setup/install_worker.cc#newcode1631 chrome/installer/setup/install_worker.cc:1631: ...
8 years, 3 months ago (2012-09-01 21:38:03 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/huangs@chromium.org/10823437/42006
8 years, 3 months ago (2012-09-02 00:31:06 UTC) #43
commit-bot: I haz the power
8 years, 3 months ago (2012-09-02 02:51:32 UTC) #44
Change committed as 154630

Powered by Google App Engine
This is Rietveld 408576698