| 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 const InstallationState& machine_state, | 613 const InstallationState& machine_state, |
| 614 uint32 file_bits) const { | 614 uint32 file_bits) const { |
| 615 static const wchar_t* const kBinaryFileNames[] = { | 615 static const wchar_t* const kBinaryFileNames[] = { |
| 616 kChromeDll, | 616 kChromeDll, |
| 617 kChromeFrameDll, | 617 kChromeFrameDll, |
| 618 kChromeFrameHelperDll, | 618 kChromeFrameHelperDll, |
| 619 kChromeFrameHelperExe, | 619 kChromeFrameHelperExe, |
| 620 }; | 620 }; |
| 621 DCHECK_NE(file_bits, 0U); | 621 DCHECK_NE(file_bits, 0U); |
| 622 DCHECK_LT(file_bits, 1U << NUM_BINARIES); | 622 DCHECK_LT(file_bits, 1U << NUM_BINARIES); |
| 623 COMPILE_ASSERT(CHROME_DLL == 1, no_youre_out_of_order); | 623 static_assert(CHROME_DLL == 1, "no, you're out of order"); |
| 624 COMPILE_ASSERT(CHROME_FRAME_DLL == 2, no_youre_out_of_order); | 624 static_assert(CHROME_FRAME_DLL == 2, "no, you're out of order"); |
| 625 COMPILE_ASSERT(CHROME_FRAME_HELPER_DLL == 4, no_youre_out_of_order); | 625 static_assert(CHROME_FRAME_HELPER_DLL == 4, "no, you're out of order"); |
| 626 COMPILE_ASSERT(CHROME_FRAME_HELPER_EXE == 8, no_youre_out_of_order); | 626 static_assert(CHROME_FRAME_HELPER_EXE == 8, "no, you're out of order"); |
| 627 | 627 |
| 628 // Check only for the current version (i.e., the version we are upgrading | 628 // Check only for the current version (i.e., the version we are upgrading |
| 629 // _from_). Later versions from pending in-use updates need not be checked | 629 // _from_). Later versions from pending in-use updates need not be checked |
| 630 // since the current version is guaranteed to be in use if any such are. | 630 // since the current version is guaranteed to be in use if any such are. |
| 631 scoped_ptr<Version> current_version(GetCurrentVersion(machine_state)); | 631 scoped_ptr<Version> current_version(GetCurrentVersion(machine_state)); |
| 632 if (!current_version) | 632 if (!current_version) |
| 633 return false; | 633 return false; |
| 634 base::FilePath directory( | 634 base::FilePath directory( |
| 635 target_path().AppendASCII(current_version->GetString())); | 635 target_path().AppendASCII(current_version->GetString())); |
| 636 for (int i = 0; i < NUM_BINARIES; ++i) { | 636 for (int i = 0; i < NUM_BINARIES; ++i) { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 } | 824 } |
| 825 if (!install_list->Do()) | 825 if (!install_list->Do()) |
| 826 LOG(ERROR) << "Failed to record installer error information in registry."; | 826 LOG(ERROR) << "Failed to record installer error information in registry."; |
| 827 } | 827 } |
| 828 | 828 |
| 829 bool InstallerState::RequiresActiveSetup() const { | 829 bool InstallerState::RequiresActiveSetup() const { |
| 830 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); | 830 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); |
| 831 } | 831 } |
| 832 | 832 |
| 833 } // namespace installer | 833 } // namespace installer |
| OLD | NEW |