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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 514 |
515 void InstallerState::GetExistingExeVersions( | 515 void InstallerState::GetExistingExeVersions( |
516 std::set<std::string>* existing_versions) const { | 516 std::set<std::string>* existing_versions) const { |
517 | 517 |
518 static const wchar_t* const kChromeFilenames[] = { | 518 static const wchar_t* const kChromeFilenames[] = { |
519 installer::kChromeExe, | 519 installer::kChromeExe, |
520 installer::kChromeNewExe, | 520 installer::kChromeNewExe, |
521 installer::kChromeOldExe, | 521 installer::kChromeOldExe, |
522 }; | 522 }; |
523 | 523 |
524 for (int i = 0; i < arraysize(kChromeFilenames); ++i) { | 524 for (size_t i = 0; i < arraysize(kChromeFilenames); ++i) { |
525 base::FilePath chrome_exe(target_path().Append(kChromeFilenames[i])); | 525 base::FilePath chrome_exe(target_path().Append(kChromeFilenames[i])); |
526 scoped_ptr<FileVersionInfo> file_version_info( | 526 scoped_ptr<FileVersionInfo> file_version_info( |
527 FileVersionInfo::CreateFileVersionInfo(chrome_exe)); | 527 FileVersionInfo::CreateFileVersionInfo(chrome_exe)); |
528 if (file_version_info) { | 528 if (file_version_info) { |
529 base::string16 version_string = file_version_info->file_version(); | 529 base::string16 version_string = file_version_info->file_version(); |
530 if (!version_string.empty() && base::IsStringASCII(version_string)) | 530 if (!version_string.empty() && base::IsStringASCII(version_string)) |
531 existing_versions->insert(base::UTF16ToASCII(version_string)); | 531 existing_versions->insert(base::UTF16ToASCII(version_string)); |
532 } | 532 } |
533 } | 533 } |
534 } | 534 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 688 } |
689 if (!install_list->Do()) | 689 if (!install_list->Do()) |
690 LOG(ERROR) << "Failed to record installer error information in registry."; | 690 LOG(ERROR) << "Failed to record installer error information in registry."; |
691 } | 691 } |
692 | 692 |
693 bool InstallerState::RequiresActiveSetup() const { | 693 bool InstallerState::RequiresActiveSetup() const { |
694 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); | 694 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); |
695 } | 695 } |
696 | 696 |
697 } // namespace installer | 697 } // namespace installer |
OLD | NEW |