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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 << existing_chrome->uninstall_command().GetCommandLineString(); | 1190 << existing_chrome->uninstall_command().GetCommandLineString(); |
1191 MessageBox(NULL, message.c_str(), NULL, MB_ICONERROR); | 1191 MessageBox(NULL, message.c_str(), NULL, MB_ICONERROR); |
1192 return installer::INSTALL_FAILED; | 1192 return installer::INSTALL_FAILED; |
1193 } | 1193 } |
1194 | 1194 |
1195 base::FilePath chrome_exe( | 1195 base::FilePath chrome_exe( |
1196 cmd_line.GetSwitchValuePath(installer::switches::kRegisterDevChrome)); | 1196 cmd_line.GetSwitchValuePath(installer::switches::kRegisterDevChrome)); |
1197 if (chrome_exe.empty()) | 1197 if (chrome_exe.empty()) |
1198 chrome_exe = cmd_line.GetProgram().DirName().Append(installer::kChromeExe); | 1198 chrome_exe = cmd_line.GetProgram().DirName().Append(installer::kChromeExe); |
1199 if (!chrome_exe.IsAbsolute()) | 1199 if (!chrome_exe.IsAbsolute()) |
1200 file_util::AbsolutePath(&chrome_exe); | 1200 chrome_exe = base::MakeAbsoluteFilePath(chrome_exe); |
1201 | 1201 |
1202 installer::InstallStatus status = installer::FIRST_INSTALL_SUCCESS; | 1202 installer::InstallStatus status = installer::FIRST_INSTALL_SUCCESS; |
1203 if (file_util::PathExists(chrome_exe)) { | 1203 if (file_util::PathExists(chrome_exe)) { |
1204 Product chrome(chrome_dist); | 1204 Product chrome(chrome_dist); |
1205 | 1205 |
1206 // Create the Start menu shortcut and pin it to the taskbar. | 1206 // Create the Start menu shortcut and pin it to the taskbar. |
1207 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); | 1207 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); |
1208 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); | 1208 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); |
1209 shortcut_properties.set_dual_mode(true); | 1209 shortcut_properties.set_dual_mode(true); |
1210 shortcut_properties.set_pin_to_taskbar(true); | 1210 shortcut_properties.set_pin_to_taskbar(true); |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 if (!(installer_state.is_msi() && is_uninstall)) | 1727 if (!(installer_state.is_msi() && is_uninstall)) |
1728 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1728 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1729 // to pass through, since this is only returned on uninstall which is | 1729 // to pass through, since this is only returned on uninstall which is |
1730 // never invoked directly by Google Update. | 1730 // never invoked directly by Google Update. |
1731 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1731 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1732 | 1732 |
1733 VLOG(1) << "Installation complete, returning: " << return_code; | 1733 VLOG(1) << "Installation complete, returning: " << return_code; |
1734 | 1734 |
1735 return return_code; | 1735 return return_code; |
1736 } | 1736 } |
OLD | NEW |