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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 | 279 |
280 void InstallUtil::AddInstallerResultItems( | 280 void InstallUtil::AddInstallerResultItems( |
281 bool system_install, | 281 bool system_install, |
282 const base::string16& state_key, | 282 const base::string16& state_key, |
283 installer::InstallStatus status, | 283 installer::InstallStatus status, |
284 int string_resource_id, | 284 int string_resource_id, |
285 const base::string16* const launch_cmd, | 285 const base::string16* const launch_cmd, |
286 WorkItemList* install_list) { | 286 WorkItemList* install_list) { |
287 DCHECK(install_list); | 287 DCHECK(install_list); |
288 DCHECK(install_list->best_effort()); | |
289 DCHECK(!install_list->rollback_enabled()); | |
290 | |
291 const HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 288 const HKEY root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
292 DWORD installer_result = (GetInstallReturnCode(status) == 0) ? 0 : 1; | 289 DWORD installer_result = (GetInstallReturnCode(status) == 0) ? 0 : 1; |
293 install_list->AddCreateRegKeyWorkItem(root, state_key, KEY_WOW64_32KEY); | 290 install_list->AddCreateRegKeyWorkItem(root, state_key, KEY_WOW64_32KEY); |
294 install_list->AddSetRegValueWorkItem(root, | 291 install_list->AddSetRegValueWorkItem(root, |
295 state_key, | 292 state_key, |
296 KEY_WOW64_32KEY, | 293 KEY_WOW64_32KEY, |
297 installer::kInstallerResult, | 294 installer::kInstallerResult, |
298 installer_result, | 295 installer_result, |
299 true); | 296 true); |
300 install_list->AddSetRegValueWorkItem(root, | 297 install_list->AddSetRegValueWorkItem(root, |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 | 678 |
682 // Open the program and see if it references the expected file. | 679 // Open the program and see if it references the expected file. |
683 base::File file; | 680 base::File file; |
684 BY_HANDLE_FILE_INFORMATION info = {}; | 681 BY_HANDLE_FILE_INFORMATION info = {}; |
685 | 682 |
686 return (OpenForInfo(path, &file, comparison_type_) && GetInfo(file, &info) && | 683 return (OpenForInfo(path, &file, comparison_type_) && GetInfo(file, &info) && |
687 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 684 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
688 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 685 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
689 info.nFileIndexLow == file_info_.nFileIndexLow); | 686 info.nFileIndexLow == file_info_.nFileIndexLow); |
690 } | 687 } |
OLD | NEW |