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 <oaidl.h> | 10 #include <oaidl.h> |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 DCHECK(app); | 208 DCHECK(app); |
209 DCHECK(command_with_parameter); | 209 DCHECK(command_with_parameter); |
210 DCHECK(work_item_list); | 210 DCHECK(work_item_list); |
211 | 211 |
212 base::string16 full_cmd_key( | 212 base::string16 full_cmd_key( |
213 GetRegCommandKey(product.distribution(), command_key)); | 213 GetRegCommandKey(product.distribution(), command_key)); |
214 | 214 |
215 if (installer_state.operation() == InstallerState::UNINSTALL) { | 215 if (installer_state.operation() == InstallerState::UNINSTALL) { |
216 work_item_list->AddDeleteRegKeyWorkItem( | 216 work_item_list->AddDeleteRegKeyWorkItem( |
217 installer_state.root_key(), full_cmd_key)->set_log_message( | 217 installer_state.root_key(), full_cmd_key)->set_log_message( |
218 "removing " + WideToASCII(command_key) + " command"); | 218 "removing " + base::UTF16ToASCII(command_key) + " command"); |
219 } else { | 219 } else { |
220 CommandLine cmd_line(installer_state.target_path().Append(app)); | 220 CommandLine cmd_line(installer_state.target_path().Append(app)); |
221 cmd_line.AppendSwitchASCII(command_with_parameter, "%1"); | 221 cmd_line.AppendSwitchASCII(command_with_parameter, "%1"); |
222 | 222 |
223 AppCommand cmd(cmd_line.GetCommandLineString()); | 223 AppCommand cmd(cmd_line.GetCommandLineString()); |
224 cmd.set_sends_pings(true); | 224 cmd.set_sends_pings(true); |
225 cmd.set_is_web_accessible(true); | 225 cmd.set_is_web_accessible(true); |
226 cmd.set_is_run_as_user(true); | 226 cmd.set_is_run_as_user(true); |
227 cmd.AddWorkItems(installer_state.root_key(), full_cmd_key, work_item_list); | 227 cmd.AddWorkItems(installer_state.root_key(), full_cmd_key, work_item_list); |
228 } | 228 } |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 base::string16 cmd_key( | 1439 base::string16 cmd_key( |
1440 GetRegCommandKey(BrowserDistribution::GetSpecificDistribution( | 1440 GetRegCommandKey(BrowserDistribution::GetSpecificDistribution( |
1441 BrowserDistribution::CHROME_BINARIES), | 1441 BrowserDistribution::CHROME_BINARIES), |
1442 kCmdQuickEnableCf)); | 1442 kCmdQuickEnableCf)); |
1443 | 1443 |
1444 // Unconditionally remove the legacy Quick Enable command from the binaries. | 1444 // Unconditionally remove the legacy Quick Enable command from the binaries. |
1445 // Do this even if multi-install Chrome isn't installed to ensure that it is | 1445 // Do this even if multi-install Chrome isn't installed to ensure that it is |
1446 // not left behind in any case. | 1446 // not left behind in any case. |
1447 work_item_list->AddDeleteRegKeyWorkItem( | 1447 work_item_list->AddDeleteRegKeyWorkItem( |
1448 installer_state.root_key(), cmd_key)->set_log_message( | 1448 installer_state.root_key(), cmd_key)->set_log_message( |
1449 "removing " + WideToASCII(kCmdQuickEnableCf) + " command"); | 1449 "removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + " command"); |
1450 | 1450 |
1451 } | 1451 } |
1452 | 1452 |
1453 } // namespace installer | 1453 } // namespace installer |
OLD | NEW |