OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/installer/setup/install.h" | 5 #include "chrome/installer/setup/install.h" |
6 | 6 |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 #include <time.h> | 8 #include <time.h> |
9 #include <winuser.h> | 9 #include <winuser.h> |
10 | 10 |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
545 | 545 |
546 installer_state.RemoveOldVersionDirectories( | 546 installer_state.RemoveOldVersionDirectories( |
547 new_version, | 547 new_version, |
548 existing_version.get(), | 548 existing_version.get(), |
549 install_temp_path); | 549 install_temp_path); |
550 } | 550 } |
551 | 551 |
552 return result; | 552 return result; |
553 } | 553 } |
554 | 554 |
555 InstallStatus ChromeBrowserOnOsUpgrade(const InstallationState& original_state, | |
556 const InstallerState& installer_state, | |
557 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.
| |
558 const Product* chrome_install = | |
559 installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); | |
560 DCHECK(chrome_install); | |
561 | |
562 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.
| |
563 base::win::Version win_version = base::win::GetVersion(); | |
gab
2012/08/28 16:08:19
inline in if condition
| |
564 | |
565 // Upon upgrading to Windows 8, we need to fix Chrome shortcuts and register | |
566 // Chrome, so that Metro Chrome would work if Chrome is the default browser. | |
567 if (win_version >= base::win::VERSION_WIN8) { | |
568 // Trigger error on next OS upgrade, so we can review if this is needed. | |
569 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.
| |
570 | |
571 VLOG(1) << "Updating and registering shortcut for Windows 8."; | |
572 uint32 shortcut_options = ShellUtil::SHORTCUT_DUAL_MODE; | |
573 CreateOrUpdateDesktopAndQuickLaunchShortcuts( | |
574 installer_state, *chrome_install, shortcut_options); | |
575 CreateOrUpdateStartMenuAndTaskbarShortcuts( | |
576 installer_state, setup_exe, *chrome_install, shortcut_options); | |
577 RegisterChromeOnMachine(installer_state, *chrome_install, false); | |
578 } | |
579 | |
580 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
| |
581 } | |
582 | |
555 } // namespace installer | 583 } // namespace installer |
OLD | NEW |