| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 installer::kChromeExe, | 673 installer::kChromeExe, |
| 674 installer::kChromeNewExe, | 674 installer::kChromeNewExe, |
| 675 installer::kChromeOldExe, | 675 installer::kChromeOldExe, |
| 676 }; | 676 }; |
| 677 | 677 |
| 678 for (int i = 0; i < arraysize(kChromeFilenames); ++i) { | 678 for (int i = 0; i < arraysize(kChromeFilenames); ++i) { |
| 679 base::FilePath chrome_exe(target_path().Append(kChromeFilenames[i])); | 679 base::FilePath chrome_exe(target_path().Append(kChromeFilenames[i])); |
| 680 scoped_ptr<FileVersionInfo> file_version_info( | 680 scoped_ptr<FileVersionInfo> file_version_info( |
| 681 FileVersionInfo::CreateFileVersionInfo(chrome_exe)); | 681 FileVersionInfo::CreateFileVersionInfo(chrome_exe)); |
| 682 if (file_version_info) { | 682 if (file_version_info) { |
| 683 string16 version_string = file_version_info->file_version(); | 683 base::string16 version_string = file_version_info->file_version(); |
| 684 if (!version_string.empty() && IsStringASCII(version_string)) | 684 if (!version_string.empty() && IsStringASCII(version_string)) |
| 685 existing_versions->insert(WideToASCII(version_string)); | 685 existing_versions->insert(WideToASCII(version_string)); |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 } | 688 } |
| 689 | 689 |
| 690 void InstallerState::RemoveOldVersionDirectories( | 690 void InstallerState::RemoveOldVersionDirectories( |
| 691 const Version& new_version, | 691 const Version& new_version, |
| 692 Version* existing_version, | 692 Version* existing_version, |
| 693 const base::FilePath& temp_path) const { | 693 const base::FilePath& temp_path) const { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 } | 843 } |
| 844 if (!install_list->Do()) | 844 if (!install_list->Do()) |
| 845 LOG(ERROR) << "Failed to record installer error information in registry."; | 845 LOG(ERROR) << "Failed to record installer error information in registry."; |
| 846 } | 846 } |
| 847 | 847 |
| 848 bool InstallerState::RequiresActiveSetup() const { | 848 bool InstallerState::RequiresActiveSetup() const { |
| 849 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); | 849 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); |
| 850 } | 850 } |
| 851 | 851 |
| 852 } // namespace installer | 852 } // namespace installer |
| OLD | NEW |