Index: chrome/installer/setup/install.cc |
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc |
index bd7ab6ff49ef95e607eb51f31d95e09e4a8cae39..07bf6b603c6069f9b909fad1484df07e523e1cf8 100644 |
--- a/chrome/installer/setup/install.cc |
+++ b/chrome/installer/setup/install.cc |
@@ -552,4 +552,26 @@ InstallStatus InstallOrUpdateProduct( |
return result; |
} |
+bool OnOsUpgrade(const InstallationState& original_state, |
+ const InstallerState& installer_state, |
+ const FilePath& setup_exe) { |
+ const Product* chrome_install = |
+ installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); |
+ DCHECK(chrome_install); |
grt (UTC plus 2)
2012/08/30 04:15:25
if (!chrome_install) {
NOTREACHED();
return fa
huangs
2012/08/30 17:13:07
No longer need this, as we'll pass Product& chrome
|
+ |
+ // Upon upgrading to Windows 8, we need to fix Chrome shortcuts and register |
+ // Chrome, so that Metro Chrome would work if Chrome is the default browser. |
+ if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
+ VLOG(1) << "Updating and registering shortcut for Windows 8."; |
grt (UTC plus 2)
2012/08/30 04:15:25
"shortcut" -> "shortcuts"
and remove "Windows 8" s
huangs
2012/08/30 17:13:07
Done.
|
+ uint32 shortcut_options = ShellUtil::SHORTCUT_DUAL_MODE; |
+ CreateOrUpdateDesktopAndQuickLaunchShortcuts( |
+ installer_state, *chrome_install, shortcut_options); |
+ CreateOrUpdateStartMenuAndTaskbarShortcuts( |
+ installer_state, setup_exe, *chrome_install, shortcut_options); |
+ RegisterChromeOnMachine(installer_state, *chrome_install, false); |
+ SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); |
gab
2012/08/30 14:24:32
You should not need to SHChangeNotify, the shortcu
huangs
2012/08/30 17:13:07
Done.
|
+ } |
+ return true; |
+} |
+ |
} // namespace installer |