| 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 "chrome/installer/setup/setup_main.h" | 5 #include "chrome/installer/setup/setup_main.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <msi.h> | 8 #include <msi.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <shlobj.h> | 10 #include <shlobj.h> |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 installer::InstallStatus status = installer::FIRST_INSTALL_SUCCESS; | 951 installer::InstallStatus status = installer::FIRST_INSTALL_SUCCESS; |
| 952 if (base::PathExists(chrome_exe)) { | 952 if (base::PathExists(chrome_exe)) { |
| 953 Product chrome(chrome_dist); | 953 Product chrome(chrome_dist); |
| 954 | 954 |
| 955 // Create the Start menu shortcut and pin it to the taskbar. | 955 // Create the Start menu shortcut and pin it to the taskbar. |
| 956 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); | 956 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); |
| 957 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); | 957 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); |
| 958 shortcut_properties.set_dual_mode(true); | 958 shortcut_properties.set_dual_mode(true); |
| 959 shortcut_properties.set_pin_to_taskbar(true); | 959 shortcut_properties.set_pin_to_taskbar(true); |
| 960 ShellUtil::CreateOrUpdateShortcut( | 960 ShellUtil::CreateOrUpdateShortcut( |
| 961 ShellUtil::SHORTCUT_LOCATION_START_MENU, chrome_dist, | 961 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, chrome_dist, |
| 962 shortcut_properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS); | 962 shortcut_properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS); |
| 963 | 963 |
| 964 // Register Chrome at user-level and make it default. | 964 // Register Chrome at user-level and make it default. |
| 965 scoped_ptr<WorkItemList> delegate_execute_list( | 965 scoped_ptr<WorkItemList> delegate_execute_list( |
| 966 WorkItem::CreateWorkItemList()); | 966 WorkItem::CreateWorkItemList()); |
| 967 installer::AddDelegateExecuteWorkItems( | 967 installer::AddDelegateExecuteWorkItems( |
| 968 installer_state, chrome_exe.DirName(), Version(), chrome, | 968 installer_state, chrome_exe.DirName(), Version(), chrome, |
| 969 delegate_execute_list.get()); | 969 delegate_execute_list.get()); |
| 970 delegate_execute_list->Do(); | 970 delegate_execute_list->Do(); |
| 971 if (ShellUtil::CanMakeChromeDefaultUnattended()) { | 971 if (ShellUtil::CanMakeChromeDefaultUnattended()) { |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 if (!(installer_state.is_msi() && is_uninstall)) | 1852 if (!(installer_state.is_msi() && is_uninstall)) |
| 1853 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1853 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
| 1854 // to pass through, since this is only returned on uninstall which is | 1854 // to pass through, since this is only returned on uninstall which is |
| 1855 // never invoked directly by Google Update. | 1855 // never invoked directly by Google Update. |
| 1856 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1856 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1857 | 1857 |
| 1858 VLOG(1) << "Installation complete, returning: " << return_code; | 1858 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1859 | 1859 |
| 1860 return return_code; | 1860 return return_code; |
| 1861 } | 1861 } |
| OLD | NEW |