Index: chrome/installer/setup/install.cc |
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc |
index bd7ab6ff49ef95e607eb51f31d95e09e4a8cae39..ef10ff56209f6f76945639e218762b8fbea0372c 100644 |
--- a/chrome/installer/setup/install.cc |
+++ b/chrome/installer/setup/install.cc |
@@ -552,4 +552,32 @@ InstallStatus InstallOrUpdateProduct( |
return result; |
} |
+InstallStatus ChromeBrowserOnOsUpgrade(const InstallationState& original_state, |
+ const InstallerState& installer_state, |
+ const CommandLine& cmd_line) { |
gab
2012/08/28 16:08:19
Since all you need is setup_exe here, take setup_e
huangs
2012/08/29 17:02:54
Done.
|
+ const Product* chrome_install = |
+ installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); |
+ DCHECK(chrome_install); |
+ |
+ const FilePath& setup_exe = cmd_line.GetProgram(); |
gab
2012/08/28 16:08:19
Chromium style is to initialize non-POD types usin
huangs
2012/08/29 17:02:54
Done.
|
+ base::win::Version win_version = base::win::GetVersion(); |
gab
2012/08/28 16:08:19
inline in if condition
|
+ |
+ // 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 (win_version >= base::win::VERSION_WIN8) { |
+ // Trigger error on next OS upgrade, so we can review if this is needed. |
+ DCHECK(win_version == base::win::VERSION_WIN8); |
gab
2012/08/28 16:08:19
Remove this comment/DCHECK, everything will need t
huangs
2012/08/29 17:02:54
Done.
|
+ |
+ VLOG(1) << "Updating and registering shortcut for Windows 8."; |
+ 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); |
+ } |
+ |
+ return installer::ON_OS_UPGRADE_SUCCESSFUL; |
gab
2012/08/28 16:08:19
I don't think this has any value as there is no ot
grt (UTC plus 2)
2012/08/28 19:35:39
should the CreateOrUpdate... and Register... funcs
huangs
2012/08/29 17:02:54
The caller HandleNonInstallCmdLineOptions() expect
grt (UTC plus 2)
2012/08/29 17:39:21
as mentioned in my comment in util_constants.h, In
|
+} |
+ |
} // namespace installer |