Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/installer/setup/install.cc

Issue 1764053002: Revert of Delete old files after an update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_installer_util.gypi ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/chrome_installer_util.gypi ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698