OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <shlobj.h> | 5 #include <shlobj.h> |
6 | 6 |
7 #include "chrome/installer/setup/setup.h" | 7 #include "chrome/installer/setup/setup.h" |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 (install_status == installer_util::INSTALL_REPAIRED) || | 123 (install_status == installer_util::INSTALL_REPAIRED) || |
124 (file_util::PathExists(uninstall_link))) { | 124 (file_util::PathExists(uninstall_link))) { |
125 if (!file_util::PathExists(shortcut_path)) | 125 if (!file_util::PathExists(shortcut_path)) |
126 file_util::CreateDirectoryW(shortcut_path); | 126 file_util::CreateDirectoryW(shortcut_path); |
127 std::wstring setup_exe(installer::GetInstallerPathUnderChrome(install_path, | 127 std::wstring setup_exe(installer::GetInstallerPathUnderChrome(install_path, |
128 new_version)); | 128 new_version)); |
129 file_util::AppendToPath(&setup_exe, | 129 file_util::AppendToPath(&setup_exe, |
130 file_util::GetFilenameFromPath(exe_path)); | 130 file_util::GetFilenameFromPath(exe_path)); |
131 std::wstring arguments(L" --"); | 131 std::wstring arguments(L" --"); |
132 arguments.append(installer_util::switches::kUninstall); | 132 arguments.append(installer_util::switches::kUninstall); |
| 133 if (system_install) { |
| 134 arguments.append(L" --"); |
| 135 arguments.append(installer_util::switches::kSystemInstall); |
| 136 } |
| 137 |
133 LOG(INFO) << "Creating/updating uninstall link at " << uninstall_link; | 138 LOG(INFO) << "Creating/updating uninstall link at " << uninstall_link; |
134 std::wstring target_folder = file_util::GetDirectoryFromPath(install_path); | 139 std::wstring target_folder = file_util::GetDirectoryFromPath(install_path); |
135 ret2 = file_util::CreateShortcutLink(setup_exe.c_str(), | 140 ret2 = file_util::CreateShortcutLink(setup_exe.c_str(), |
136 uninstall_link.c_str(), | 141 uninstall_link.c_str(), |
137 target_folder.c_str(), | 142 target_folder.c_str(), |
138 arguments.c_str(), | 143 arguments.c_str(), |
139 NULL, | 144 NULL, |
140 setup_exe.c_str(), | 145 setup_exe.c_str(), |
141 0); | 146 0); |
142 } | 147 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true); | 222 ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true); |
218 LOG(INFO) << "Return status of Chrome browser registration " << ret; | 223 LOG(INFO) << "Return status of Chrome browser registration " << ret; |
219 } else { | 224 } else { |
220 RemoveOldVersionDirs(install_path, new_version.GetString()); | 225 RemoveOldVersionDirs(install_path, new_version.GetString()); |
221 } | 226 } |
222 } | 227 } |
223 | 228 |
224 return result; | 229 return result; |
225 } | 230 } |
226 | 231 |
OLD | NEW |