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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 if (!chrome_exe.IsAbsolute()) | 969 if (!chrome_exe.IsAbsolute()) |
970 chrome_exe = base::MakeAbsoluteFilePath(chrome_exe); | 970 chrome_exe = base::MakeAbsoluteFilePath(chrome_exe); |
971 | 971 |
972 installer::InstallStatus status = installer::FIRST_INSTALL_SUCCESS; | 972 installer::InstallStatus status = installer::FIRST_INSTALL_SUCCESS; |
973 if (base::PathExists(chrome_exe)) { | 973 if (base::PathExists(chrome_exe)) { |
974 Product chrome(chrome_dist); | 974 Product chrome(chrome_dist); |
975 | 975 |
976 // Create the Start menu shortcut and pin it to the Win7+ taskbar. | 976 // Create the Start menu shortcut and pin it to the Win7+ taskbar. |
977 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); | 977 ShellUtil::ShortcutProperties shortcut_properties(ShellUtil::CURRENT_USER); |
978 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); | 978 chrome.AddDefaultShortcutProperties(chrome_exe, &shortcut_properties); |
979 if (InstallUtil::ShouldInstallMetroProperties()) | |
980 shortcut_properties.set_dual_mode(true); | |
981 shortcut_properties.set_pin_to_taskbar(true); | 979 shortcut_properties.set_pin_to_taskbar(true); |
982 ShellUtil::CreateOrUpdateShortcut( | 980 ShellUtil::CreateOrUpdateShortcut( |
983 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, chrome_dist, | 981 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, chrome_dist, |
984 shortcut_properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS); | 982 shortcut_properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS); |
985 | 983 |
986 // Register Chrome at user-level and make it default. | 984 // Register Chrome at user-level and make it default. |
987 scoped_ptr<WorkItemList> delegate_execute_list( | 985 scoped_ptr<WorkItemList> delegate_execute_list( |
988 WorkItem::CreateWorkItemList()); | 986 WorkItem::CreateWorkItemList()); |
989 installer::AddDelegateExecuteWorkItems( | 987 installer::AddDelegateExecuteWorkItems( |
990 installer_state, chrome_exe.DirName(), Version(), chrome, | 988 installer_state, chrome_exe.DirName(), Version(), chrome, |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1773 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1776 // to pass through, since this is only returned on uninstall which is | 1774 // to pass through, since this is only returned on uninstall which is |
1777 // never invoked directly by Google Update. | 1775 // never invoked directly by Google Update. |
1778 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1776 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1779 } | 1777 } |
1780 | 1778 |
1781 VLOG(1) << "Installation complete, returning: " << return_code; | 1779 VLOG(1) << "Installation complete, returning: " << return_code; |
1782 | 1780 |
1783 return return_code; | 1781 return return_code; |
1784 } | 1782 } |
OLD | NEW |