| 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 // This file contains the definitions of the installer functions that build | 5 // This file contains the definitions of the installer functions that build |
| 6 // the WorkItemList used to install the application. | 6 // the WorkItemList used to install the application. |
| 7 | 7 |
| 8 #include "chrome/installer/setup/install_worker.h" | 8 #include "chrome/installer/setup/install_worker.h" |
| 9 | 9 |
| 10 #include <windows.h> // NOLINT | 10 #include <windows.h> // NOLINT |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 | 890 |
| 891 // Ensure that Chrome is the product being installed or updated (there are no | 891 // Ensure that Chrome is the product being installed or updated (there are no |
| 892 // other products, so it is especially unexpected for this to fail). | 892 // other products, so it is especially unexpected for this to fail). |
| 893 const Product* chrome_product = | 893 const Product* chrome_product = |
| 894 installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); | 894 installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); |
| 895 if (!chrome_product) { | 895 if (!chrome_product) { |
| 896 LOG(DFATAL) << "Not operating on Chrome while migrating to single-install."; | 896 LOG(DFATAL) << "Not operating on Chrome while migrating to single-install."; |
| 897 return; | 897 return; |
| 898 } | 898 } |
| 899 | 899 |
| 900 const ProductState* chrome_state = original_state.GetProductState( | 900 // Bail out if an existing multi-install Chrome is not being migrated to |
| 901 installer_state.system_install(), | 901 // single-install. |
| 902 BrowserDistribution::CHROME_BROWSER); | 902 if (!installer_state.is_migrating_to_single()) { |
| 903 // Bail out if there is not an existing multi-install Chrome that is being | |
| 904 // updated. | |
| 905 if (!chrome_state || !chrome_state->is_multi_install()) { | |
| 906 VLOG(1) << "No multi-install Chrome found to migrate to single-install."; | 903 VLOG(1) << "No multi-install Chrome found to migrate to single-install."; |
| 907 return; | 904 return; |
| 908 } | 905 } |
| 909 | 906 |
| 910 const ProductState* binaries_state = original_state.GetProductState( | 907 const ProductState* binaries_state = original_state.GetProductState( |
| 911 installer_state.system_install(), | 908 installer_state.system_install(), |
| 912 BrowserDistribution::CHROME_BINARIES); | 909 BrowserDistribution::CHROME_BINARIES); |
| 913 | 910 |
| 914 // There is nothing to be done if the binaries do not have stats. | 911 // There is nothing to be done if the binaries do not have stats. |
| 915 DWORD usagestats = 0; | 912 DWORD usagestats = 0; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 // Unconditionally remove the legacy Quick Enable command from the binaries. | 1410 // Unconditionally remove the legacy Quick Enable command from the binaries. |
| 1414 // Do this even if multi-install Chrome isn't installed to ensure that it is | 1411 // Do this even if multi-install Chrome isn't installed to ensure that it is |
| 1415 // not left behind in any case. | 1412 // not left behind in any case. |
| 1416 work_item_list->AddDeleteRegKeyWorkItem( | 1413 work_item_list->AddDeleteRegKeyWorkItem( |
| 1417 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) | 1414 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) |
| 1418 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + | 1415 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + |
| 1419 " command"); | 1416 " command"); |
| 1420 } | 1417 } |
| 1421 | 1418 |
| 1422 } // namespace installer | 1419 } // namespace installer |
| OLD | NEW |