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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 if (base::PathExists(chrome_exe)) { | 975 if (base::PathExists(chrome_exe)) { |
976 Product chrome(chrome_dist); | 976 Product chrome(chrome_dist); |
977 | 977 |
978 // Create the Start menu shortcut and pin it to the Win7+ taskbar. | 978 // Create the Start menu shortcut and pin it to the Win7+ taskbar. |
979 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); | 979 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); |
980 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); | 980 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); |
981 if (InstallUtil::ShouldInstallMetroProperties()) | 981 if (InstallUtil::ShouldInstallMetroProperties()) |
982 shortcut_properties.set_dual_mode(true); | 982 shortcut_properties.set_dual_mode(true); |
983 shortcut_properties.set_pin_to_taskbar(true); | 983 shortcut_properties.set_pin_to_taskbar(true); |
984 ShellUtil::CreateOrUpdateShortcut( | 984 ShellUtil::CreateOrUpdateShortcut( |
985 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, chrome_dist, | 985 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, chrome_dist, |
986 shortcut_properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS); | 986 shortcut_properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS); |
987 | 987 |
988 // Register Chrome at user-level and make it default. | 988 // Register Chrome at user-level and make it default. |
989 scoped_ptr<WorkItemList> delegate_execute_list( | 989 scoped_ptr<WorkItemList> delegate_execute_list( |
990 WorkItem::CreateWorkItemList()); | 990 WorkItem::CreateWorkItemList()); |
991 installer::AddDelegateExecuteWorkItems( | 991 installer::AddDelegateExecuteWorkItems( |
992 installer_state, chrome_exe.DirName(), Version(), chrome, | 992 installer_state, chrome_exe.DirName(), Version(), chrome, |
993 delegate_execute_list.get()); | 993 delegate_execute_list.get()); |
994 delegate_execute_list->Do(); | 994 delegate_execute_list->Do(); |
995 if (ShellUtil::CanMakeChromeDefaultUnattended()) { | 995 if (ShellUtil::CanMakeChromeDefaultUnattended()) { |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1825 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1825 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1826 // to pass through, since this is only returned on uninstall which is | 1826 // to pass through, since this is only returned on uninstall which is |
1827 // never invoked directly by Google Update. | 1827 // never invoked directly by Google Update. |
1828 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1828 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1829 } | 1829 } |
1830 | 1830 |
1831 VLOG(1) << "Installation complete, returning: " << return_code; | 1831 VLOG(1) << "Installation complete, returning: " << return_code; |
1832 | 1832 |
1833 return return_code; | 1833 return return_code; |
1834 } | 1834 } |
OLD | NEW |