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 <windows.h> | 7 #include <windows.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
622 // At least attempt to update potentially existing all-users shortcuts. | 622 // At least attempt to update potentially existing all-users shortcuts. |
623 InstallShortcutLevel level = installer_state.system_install() ? | 623 InstallShortcutLevel level = installer_state.system_install() ? |
624 ALL_USERS : CURRENT_USER; | 624 ALL_USERS : CURRENT_USER; |
625 base::FilePath chrome_exe(installer_state.target_path().Append(kChromeExe)); | 625 base::FilePath chrome_exe(installer_state.target_path().Append(kChromeExe)); |
626 CreateOrUpdateShortcuts( | 626 CreateOrUpdateShortcuts( |
627 chrome_exe, chrome, prefs, level, INSTALL_SHORTCUT_REPLACE_EXISTING); | 627 chrome_exe, chrome, prefs, level, INSTALL_SHORTCUT_REPLACE_EXISTING); |
628 RegisterChromeOnMachine(installer_state, chrome, false); | 628 RegisterChromeOnMachine(installer_state, chrome, false); |
629 | 629 |
630 UpdateOsUpgradeBeacon(installer_state.system_install(), | 630 UpdateOsUpgradeBeacon(installer_state.system_install(), |
631 BrowserDistribution::GetDistribution()); | 631 BrowserDistribution::GetDistribution()); |
632 if (!installer_state.system_install()) | 632 |
633 // Update the per-user default-browser-beacon. For user-level installs this | |
grt (UTC plus 2)
2015/07/09 14:24:22
nit: "default browser beacon" for consistency with
gab
2015/07/09 20:41:00
Done.
| |
634 // can be done directly; whereas it requires triggering Active Setup for | |
635 // each users' subsequent login on system-level installs. | |
grt (UTC plus 2)
2015/07/09 14:24:22
english nit: users' -> user's ("each user" is sing
gab
2015/07/09 20:41:00
Done.
| |
636 if (!installer_state.system_install()) { | |
633 UpdateDefaultBrowserBeaconForPath(chrome_exe); | 637 UpdateDefaultBrowserBeaconForPath(chrome_exe); |
638 } else { | |
639 UpdateActiveSetupVersionWorkItem active_setup_work_item( | |
640 InstallUtil::GetActiveSetupPath(chrome.distribution()), | |
641 UpdateActiveSetupVersionWorkItem:: | |
642 UPDATE_AND_BUMP_OS_UPGRADES_COMPONENT); | |
643 if (active_setup_work_item.Do()) | |
644 VLOG(1) << "Bumped Active Setup Version on-os-upgrade."; | |
645 else | |
646 LOG(ERROR) << "Bumping Active Setup Version on-os-upgrade failed."; | |
grt (UTC plus 2)
2015/07/09 14:24:22
nit: it looks like more than half of the error mes
gab
2015/07/09 20:41:00
Sure, kind of redundant with "Error: (...)" but my
| |
647 } | |
634 } | 648 } |
635 } | 649 } |
636 | 650 |
637 // NOTE: Should the work done here, on Active Setup, change: kActiveSetupVersion | 651 // NOTE: Should the work done here, on Active Setup, change: kActiveSetupVersion |
638 // in install_worker.cc needs to be increased for Active Setup to invoke this | 652 // in install_worker.cc needs to be increased for Active Setup to invoke this |
639 // again for all users of this install. | 653 // again for all users of this install. |
640 void HandleActiveSetupForBrowser(const base::FilePath& installation_root, | 654 void HandleActiveSetupForBrowser(const base::FilePath& installation_root, |
641 const installer::Product& chrome, | 655 const installer::Product& chrome, |
642 bool force) { | 656 bool force) { |
643 DCHECK(chrome.is_chrome()); | 657 DCHECK(chrome.is_chrome()); |
(...skipping 12 matching lines...) Expand all Loading... | |
656 // Read master_preferences copied beside chrome.exe at install. | 670 // Read master_preferences copied beside chrome.exe at install. |
657 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); | 671 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
658 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); | 672 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); |
659 CreateOrUpdateShortcuts( | 673 CreateOrUpdateShortcuts( |
660 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); | 674 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
661 | 675 |
662 UpdateDefaultBrowserBeaconForPath(chrome_exe); | 676 UpdateDefaultBrowserBeaconForPath(chrome_exe); |
663 } | 677 } |
664 | 678 |
665 } // namespace installer | 679 } // namespace installer |
OLD | NEW |