| 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/setup/chrome_frame_quick_enable.h" | 5 #include "chrome/installer/setup/chrome_frame_quick_enable.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // This is so that the operations below do not affect the installation | 96 // This is so that the operations below do not affect the installation |
| 97 // state of Chrome. | 97 // state of Chrome. |
| 98 installer_state->RemoveProduct( | 98 installer_state->RemoveProduct( |
| 99 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER)); | 99 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER)); |
| 100 | 100 |
| 101 FilePath setup_path(chrome_state->GetSetupPath()); | 101 FilePath setup_path(chrome_state->GetSetupPath()); |
| 102 const Version& new_version = chrome_state->version(); | 102 const Version& new_version = chrome_state->version(); |
| 103 | 103 |
| 104 // This creates the uninstallation entry for GCF. | 104 // This creates the uninstallation entry for GCF. |
| 105 AddUninstallShortcutWorkItems(*installer_state, setup_path, new_version, | 105 AddUninstallShortcutWorkItems(*installer_state, setup_path, new_version, |
| 106 item_list.get(), *cf); | 106 *cf, item_list.get()); |
| 107 // Always set the "lang" value since quick-enable always happens in the | 107 // Always set the "lang" value since quick-enable always happens in the |
| 108 // context of an interactive session with a user. | 108 // context of an interactive session with a user. |
| 109 AddVersionKeyWorkItems(installer_state->root_key(), cf->distribution(), | 109 AddVersionKeyWorkItems(installer_state->root_key(), cf->distribution(), |
| 110 new_version, true, item_list.get()); | 110 new_version, true, item_list.get()); |
| 111 AddChromeFrameWorkItems(machine_state, *installer_state, setup_path, | 111 AddChromeFrameWorkItems(machine_state, *installer_state, setup_path, |
| 112 new_version, *cf, item_list.get()); | 112 new_version, *cf, item_list.get()); |
| 113 | 113 |
| 114 const Version* opv = chrome_state->old_version(); | 114 const Version* opv = chrome_state->old_version(); |
| 115 AppendPostInstallTasks(*installer_state, setup_path, opv, | 115 AppendPostInstallTasks(*installer_state, setup_path, opv, |
| 116 new_version, temp_path.path(), item_list.get()); | 116 new_version, temp_path.path(), item_list.get()); |
| 117 | 117 |
| 118 // Before updating the channel values, add Chrome back to the mix so that | 118 // Before updating the channel values, add Chrome back to the mix so that |
| 119 // all multi-installed products' channel values get updated. | 119 // all multi-installed products' channel values get updated. |
| 120 installer_state->AddProductFromState(BrowserDistribution::CHROME_BROWSER, | 120 installer_state->AddProductFromState(BrowserDistribution::CHROME_BROWSER, |
| 121 *chrome_state); | 121 *chrome_state); |
| 122 AddGoogleUpdateWorkItems(machine_state, *installer_state, | 122 AddGoogleUpdateWorkItems(machine_state, *installer_state, |
| 123 item_list.get()); | 123 item_list.get()); |
| 124 | 124 |
| 125 // Add the items to remove the quick-enable-cf command from the registry. | 125 // Add the items to remove the quick-enable-cf command from the registry. |
| 126 AddQuickEnableChromeFrameWorkItems( | 126 AddQuickEnableChromeFrameWorkItems( |
| 127 *installer_state, machine_state, | 127 *installer_state, machine_state, |
| 128 &chrome_state->uninstall_command().GetProgram(), | 128 chrome_state->uninstall_command().GetProgram(), |
| 129 &chrome_state->version(), | 129 new_version, |
| 130 item_list.get()); | 130 item_list.get()); |
| 131 | 131 |
| 132 if (!item_list->Do()) { | 132 if (!item_list->Do()) { |
| 133 item_list->Rollback(); | 133 item_list->Rollback(); |
| 134 status = INSTALL_FAILED; | 134 status = INSTALL_FAILED; |
| 135 } else { | 135 } else { |
| 136 DCHECK_EQ(FIRST_INSTALL_SUCCESS, status); | 136 DCHECK_EQ(FIRST_INSTALL_SUCCESS, status); |
| 137 VLOG(1) << "Chrome Frame successfully activated."; | 137 VLOG(1) << "Chrome Frame successfully activated."; |
| 138 } | 138 } |
| 139 } | 139 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 162 BrowserDistribution::CHROME_BINARIES), | 162 BrowserDistribution::CHROME_BINARIES), |
| 163 true)) { | 163 true)) { |
| 164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries."; | 164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries."; |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 return status; | 168 return status; |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace installer | 171 } // namespace installer |
| OLD | NEW |