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/util/installer_state.h" | 5 #include "chrome/installer/util/installer_state.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 version = Version(WideToASCII(dir_name.value())); | 658 version = Version(WideToASCII(dir_name.value())); |
659 // Delete the version folder if it is less than the new version and not | 659 // Delete the version folder if it is less than the new version and not |
660 // equal to the old version (if we have an old version). | 660 // equal to the old version (if we have an old version). |
661 if (version.IsValid() && | 661 if (version.IsValid() && |
662 existing_version_strings.count(version.GetString()) == 0) { | 662 existing_version_strings.count(version.GetString()) == 0) { |
663 // Note: temporarily log old version deletion at ERROR level to make it | 663 // Note: temporarily log old version deletion at ERROR level to make it |
664 // more likely we see this in the installer log. | 664 // more likely we see this in the installer log. |
665 LOG(ERROR) << "Deleting old version directory: " << next_version.value(); | 665 LOG(ERROR) << "Deleting old version directory: " << next_version.value(); |
666 | 666 |
667 // Attempt to recursively delete the old version dir. | 667 // Attempt to recursively delete the old version dir. |
668 bool delete_succeeded = file_util::Delete(next_version, true); | 668 bool delete_succeeded = base::Delete(next_version, true); |
669 | 669 |
670 // Note: temporarily log old version deletion at ERROR level to make it | 670 // Note: temporarily log old version deletion at ERROR level to make it |
671 // more likely we see this in the installer log. | 671 // more likely we see this in the installer log. |
672 LOG_IF(ERROR, !delete_succeeded) | 672 LOG_IF(ERROR, !delete_succeeded) |
673 << "Failed to delete old version directory: " << next_version.value(); | 673 << "Failed to delete old version directory: " << next_version.value(); |
674 } | 674 } |
675 } | 675 } |
676 } | 676 } |
677 | 677 |
678 void InstallerState::AddComDllList( | 678 void InstallerState::AddComDllList( |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 } | 791 } |
792 if (!install_list->Do()) | 792 if (!install_list->Do()) |
793 LOG(ERROR) << "Failed to record installer error information in registry."; | 793 LOG(ERROR) << "Failed to record installer error information in registry."; |
794 } | 794 } |
795 | 795 |
796 bool InstallerState::RequiresActiveSetup() const { | 796 bool InstallerState::RequiresActiveSetup() const { |
797 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); | 797 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); |
798 } | 798 } |
799 | 799 |
800 } // namespace installer | 800 } // namespace installer |
OLD | NEW |