| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 RegisterChromeOnMachine(installer_state, *chrome_product, | 546 RegisterChromeOnMachine(installer_state, *chrome_product, |
| 547 make_chrome_default || force_chrome_default_for_user); | 547 make_chrome_default || force_chrome_default_for_user); |
| 548 | 548 |
| 549 if (!installer_state.system_install()) { | 549 if (!installer_state.system_install()) { |
| 550 DCHECK_EQ(chrome_product->distribution(), | 550 DCHECK_EQ(chrome_product->distribution(), |
| 551 BrowserDistribution::GetDistribution()); | 551 BrowserDistribution::GetDistribution()); |
| 552 UpdateDefaultBrowserBeaconForPath( | 552 UpdateDefaultBrowserBeaconForPath( |
| 553 installer_state.target_path().Append(installer::kChromeExe)); | 553 installer_state.target_path().Append(installer::kChromeExe)); |
| 554 } | 554 } |
| 555 } | 555 } |
| 556 |
| 557 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); |
| 558 |
| 559 installer_state.RemoveOldVersionDirectories( |
| 560 new_version, |
| 561 existing_version.get(), |
| 562 install_temp_path); |
| 556 } | 563 } |
| 557 | 564 |
| 558 return result; | 565 return result; |
| 559 } | 566 } |
| 560 | 567 |
| 561 void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state, | 568 void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state, |
| 562 const installer::Product& chrome, | 569 const installer::Product& chrome, |
| 563 const base::Version& installed_version) { | 570 const base::Version& installed_version) { |
| 564 DCHECK(chrome.is_chrome()); | 571 DCHECK(chrome.is_chrome()); |
| 565 | 572 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 // Read master_preferences copied beside chrome.exe at install. | 653 // Read master_preferences copied beside chrome.exe at install. |
| 647 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); | 654 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
| 648 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); | 655 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); |
| 649 CreateOrUpdateShortcuts( | 656 CreateOrUpdateShortcuts( |
| 650 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); | 657 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
| 651 | 658 |
| 652 UpdateDefaultBrowserBeaconForPath(chrome_exe); | 659 UpdateDefaultBrowserBeaconForPath(chrome_exe); |
| 653 } | 660 } |
| 654 | 661 |
| 655 } // namespace installer | 662 } // namespace installer |
| OLD | NEW |