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 void HandleOsUpgradeForBrowser(const InstallerState& installer_state, |
| 556 const Product& chrome, |
| 557 const FilePath& setup_exe) { |
| 558 DCHECK(chrome.is_chrome()); |
| 559 // Upon upgrading to Windows 8, we need to fix Chrome shortcuts and register |
| 560 // Chrome, so that Metro Chrome would work if Chrome is the default browser. |
| 561 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 562 VLOG(1) << "Updating and registering shortcuts."; |
| 563 uint32 shortcut_options = ShellUtil::SHORTCUT_DUAL_MODE; |
| 564 CreateOrUpdateDesktopAndQuickLaunchShortcuts( |
| 565 installer_state, chrome, shortcut_options); |
| 566 CreateOrUpdateStartMenuAndTaskbarShortcuts( |
| 567 installer_state, setup_exe, chrome, shortcut_options); |
| 568 RegisterChromeOnMachine(installer_state, chrome, false); |
| 569 } |
| 570 } |
| 571 |
555 } // namespace installer | 572 } // namespace installer |
OLD | NEW |