| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_ready_mode.h" | 5 #include "chrome/installer/setup/chrome_frame_ready_mode.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 // Update Chrome's uninstallation commands to only uninstall Chrome, and add | 89 // Update Chrome's uninstallation commands to only uninstall Chrome, and add |
| 90 // an entry to the Add/Remove Programs dialog for GCF. | 90 // an entry to the Add/Remove Programs dialog for GCF. |
| 91 DCHECK(cf->ShouldCreateUninstallEntry() || opt_in_state.is_msi()); | 91 DCHECK(cf->ShouldCreateUninstallEntry() || opt_in_state.is_msi()); |
| 92 | 92 |
| 93 scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList()); | 93 scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList()); |
| 94 | 94 |
| 95 // This creates the uninstallation entry for GCF. | 95 // This creates the uninstallation entry for GCF. |
| 96 AddUninstallShortcutWorkItems(opt_in_state, cf_state->GetSetupPath(), | 96 AddUninstallShortcutWorkItems(opt_in_state, cf_state->GetSetupPath(), |
| 97 cf_state->version(), item_list.get(), *cf); | 97 cf_state->version(), *cf, item_list.get()); |
| 98 // This updates the Chrome uninstallation entries. | 98 // This updates the Chrome uninstallation entries. |
| 99 AddUninstallShortcutWorkItems(opt_in_state, chrome_state->GetSetupPath(), | 99 AddUninstallShortcutWorkItems(opt_in_state, chrome_state->GetSetupPath(), |
| 100 chrome_state->version(), item_list.get(), *chrome); | 100 chrome_state->version(), *chrome, item_list.get()); |
| 101 | 101 |
| 102 // Add a work item to delete the ChromeFrameReadyMode registry value. | 102 // Add a work item to delete the ChromeFrameReadyMode registry value. |
| 103 HKEY root = opt_in_state.root_key(); | 103 HKEY root = opt_in_state.root_key(); |
| 104 item_list->AddDeleteRegValueWorkItem(root, | 104 item_list->AddDeleteRegValueWorkItem(root, |
| 105 opt_in_state.multi_package_binaries_distribution()->GetStateKey(), | 105 opt_in_state.multi_package_binaries_distribution()->GetStateKey(), |
| 106 kChromeFrameReadyModeField); | 106 kChromeFrameReadyModeField); |
| 107 | 107 |
| 108 // Update the Google Update channel ("ap") value. | 108 // Update the Google Update channel ("ap") value. |
| 109 AddGoogleUpdateWorkItems(machine_state, opt_in_state, item_list.get()); | 109 AddGoogleUpdateWorkItems(machine_state, opt_in_state, item_list.get()); |
| 110 | 110 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 if (!item_list->Do()) { | 230 if (!item_list->Do()) { |
| 231 LOG(ERROR) << "Failed to end temporary opt out of GCF"; | 231 LOG(ERROR) << "Failed to end temporary opt out of GCF"; |
| 232 item_list->Rollback(); | 232 item_list->Rollback(); |
| 233 status = READY_MODE_END_TEMP_OPT_OUT_FAILED; | 233 status = READY_MODE_END_TEMP_OPT_OUT_FAILED; |
| 234 } | 234 } |
| 235 | 235 |
| 236 return status; | 236 return status; |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace installer | 239 } // namespace installer |
| OLD | NEW |