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 <windows.h> | 5 #include <windows.h> |
6 #include <msi.h> | 6 #include <msi.h> |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 } | 933 } |
934 } | 934 } |
935 } | 935 } |
936 | 936 |
937 // Delete the master profile file if present. Note that we do not care about | 937 // Delete the master profile file if present. Note that we do not care about |
938 // rollback here and we schedule for deletion on reboot if the delete fails. | 938 // rollback here and we schedule for deletion on reboot if the delete fails. |
939 // As such, we do not use DeleteTreeWorkItem. | 939 // As such, we do not use DeleteTreeWorkItem. |
940 if (cmd_line.HasSwitch(installer::switches::kInstallerData)) { | 940 if (cmd_line.HasSwitch(installer::switches::kInstallerData)) { |
941 base::FilePath prefs_path(cmd_line.GetSwitchValuePath( | 941 base::FilePath prefs_path(cmd_line.GetSwitchValuePath( |
942 installer::switches::kInstallerData)); | 942 installer::switches::kInstallerData)); |
943 if (!base::Delete(prefs_path, true)) { | 943 if (!base::DeleteFile(prefs_path, true)) { |
944 LOG(ERROR) << "Failed deleting master preferences file " | 944 LOG(ERROR) << "Failed deleting master preferences file " |
945 << prefs_path.value() | 945 << prefs_path.value() |
946 << ", scheduling for deletion after reboot."; | 946 << ", scheduling for deletion after reboot."; |
947 ScheduleFileSystemEntityForDeletion(prefs_path.value().c_str()); | 947 ScheduleFileSystemEntityForDeletion(prefs_path.value().c_str()); |
948 } | 948 } |
949 } | 949 } |
950 | 950 |
951 // temp_path's dtor will take care of deleting or scheduling itself for | 951 // temp_path's dtor will take care of deleting or scheduling itself for |
952 // deletion at reboot when this scope closes. | 952 // deletion at reboot when this scope closes. |
953 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); | 953 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 if (!(installer_state.is_msi() && is_uninstall)) | 1752 if (!(installer_state.is_msi() && is_uninstall)) |
1753 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1753 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1754 // to pass through, since this is only returned on uninstall which is | 1754 // to pass through, since this is only returned on uninstall which is |
1755 // never invoked directly by Google Update. | 1755 // never invoked directly by Google Update. |
1756 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1756 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1757 | 1757 |
1758 VLOG(1) << "Installation complete, returning: " << return_code; | 1758 VLOG(1) << "Installation complete, returning: " << return_code; |
1759 | 1759 |
1760 return return_code; | 1760 return return_code; |
1761 } | 1761 } |
OLD | NEW |