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 // See the corresponding header file for description of the functions in this | 5 // See the corresponding header file for description of the functions in this |
6 // file. | 6 // file. |
7 | 7 |
8 #include "chrome/installer/util/install_util.h" | 8 #include "chrome/installer/util/install_util.h" |
9 | 9 |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 void InstallUtil::AddInstallerResultItems( | 279 void InstallUtil::AddInstallerResultItems( |
280 bool system_install, | 280 bool system_install, |
281 const base::string16& state_key, | 281 const base::string16& state_key, |
282 installer::InstallStatus status, | 282 installer::InstallStatus status, |
283 int string_resource_id, | 283 int string_resource_id, |
284 const base::string16* const launch_cmd, | 284 const base::string16* const launch_cmd, |
285 WorkItemList* install_list) { | 285 WorkItemList* install_list) { |
286 DCHECK(install_list); | 286 DCHECK(install_list); |
287 const HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 287 const HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
288 DWORD installer_result = (GetInstallReturnCode(status) == 0) ? 0 : 1; | 288 DWORD installer_result = (GetInstallReturnCode(status) == 0) ? 0 : 1; |
289 install_list->AddCreateRegKeyWorkItem(root, state_key); | 289 install_list->AddCreateRegKeyWorkItem(root, |
| 290 state_key, |
| 291 WorkItem::WOW64_DEFAULT); |
290 install_list->AddSetRegValueWorkItem(root, state_key, | 292 install_list->AddSetRegValueWorkItem(root, state_key, |
291 installer::kInstallerResult, | 293 installer::kInstallerResult, |
292 installer_result, true); | 294 installer_result, true, |
| 295 WorkItem::WOW64_DEFAULT); |
293 install_list->AddSetRegValueWorkItem(root, state_key, | 296 install_list->AddSetRegValueWorkItem(root, state_key, |
294 installer::kInstallerError, | 297 installer::kInstallerError, |
295 static_cast<DWORD>(status), true); | 298 static_cast<DWORD>(status), true, |
| 299 WorkItem::WOW64_DEFAULT); |
296 if (string_resource_id != 0) { | 300 if (string_resource_id != 0) { |
297 base::string16 msg = installer::GetLocalizedString(string_resource_id); | 301 base::string16 msg = installer::GetLocalizedString(string_resource_id); |
298 install_list->AddSetRegValueWorkItem(root, state_key, | 302 install_list->AddSetRegValueWorkItem(root, state_key, |
299 installer::kInstallerResultUIString, msg, true); | 303 installer::kInstallerResultUIString, msg, true, |
| 304 WorkItem::WOW64_DEFAULT); |
300 } | 305 } |
301 if (launch_cmd != NULL && !launch_cmd->empty()) { | 306 if (launch_cmd != NULL && !launch_cmd->empty()) { |
302 install_list->AddSetRegValueWorkItem(root, state_key, | 307 install_list->AddSetRegValueWorkItem(root, state_key, |
303 installer::kInstallerSuccessLaunchCmdLine, *launch_cmd, true); | 308 installer::kInstallerSuccessLaunchCmdLine, *launch_cmd, true, |
| 309 WorkItem::WOW64_DEFAULT); |
304 } | 310 } |
305 } | 311 } |
306 | 312 |
307 void InstallUtil::UpdateInstallerStage(bool system_install, | 313 void InstallUtil::UpdateInstallerStage(bool system_install, |
308 const base::string16& state_key_path, | 314 const base::string16& state_key_path, |
309 installer::InstallerStage stage) { | 315 installer::InstallerStage stage) { |
310 DCHECK_LE(static_cast<installer::InstallerStage>(0), stage); | 316 DCHECK_LE(static_cast<installer::InstallerStage>(0), stage); |
311 DCHECK_GT(installer::NUM_STAGES, stage); | 317 DCHECK_GT(installer::NUM_STAGES, stage); |
312 const HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 318 const HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
313 RegKey state_key; | 319 RegKey state_key; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 // Open the program and see if it references the expected file. | 610 // Open the program and see if it references the expected file. |
605 base::File file; | 611 base::File file; |
606 BY_HANDLE_FILE_INFORMATION info = {}; | 612 BY_HANDLE_FILE_INFORMATION info = {}; |
607 | 613 |
608 return (OpenForInfo(path, &file) && | 614 return (OpenForInfo(path, &file) && |
609 GetInfo(file, &info) && | 615 GetInfo(file, &info) && |
610 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 616 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
611 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 617 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
612 info.nFileIndexLow == file_info_.nFileIndexLow); | 618 info.nFileIndexLow == file_info_.nFileIndexLow); |
613 } | 619 } |
OLD | NEW |