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/install.h" | 5 #include "chrome/installer/setup/install.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // There is no such thing as an all-users Quick Launch shortcut, always | 387 // There is no such thing as an all-users Quick Launch shortcut, always |
388 // install the per-user shortcut. | 388 // install the per-user shortcut. |
389 ShellUtil::ShortcutProperties quick_launch_properties(base_properties); | 389 ShellUtil::ShortcutProperties quick_launch_properties(base_properties); |
390 quick_launch_properties.level = ShellUtil::CURRENT_USER; | 390 quick_launch_properties.level = ShellUtil::CURRENT_USER; |
391 ExecuteAndLogShortcutOperation( | 391 ExecuteAndLogShortcutOperation( |
392 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, | 392 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, |
393 quick_launch_properties, shortcut_operation); | 393 quick_launch_properties, shortcut_operation); |
394 } | 394 } |
395 | 395 |
396 ShellUtil::ShortcutProperties start_menu_properties(base_properties); | 396 ShellUtil::ShortcutProperties start_menu_properties(base_properties); |
397 // IMPORTANT: Only the default (no arguments and default browserappid) browser | |
398 // shortcut in the Start menu (Start screen on Win8+) should be made dual | |
399 // mode and that prior to Windows 10 only. | |
400 if (shortcut_operation == ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS || | 397 if (shortcut_operation == ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS || |
401 shortcut_operation == | 398 shortcut_operation == |
402 ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL) { | 399 ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL) { |
403 start_menu_properties.set_pin_to_taskbar(!do_not_create_taskbar_shortcut); | 400 start_menu_properties.set_pin_to_taskbar(!do_not_create_taskbar_shortcut); |
404 } | 401 } |
405 | 402 |
406 // The attempt below to update the stortcut will fail if it does not already | 403 // The attempt below to update the stortcut will fail if it does not already |
407 // exist at the expected location on disk. First check if it exists in the | 404 // exist at the expected location on disk. First check if it exists in the |
408 // previous location (under a subdirectory) and, if so, move it to the new | 405 // previous location (under a subdirectory) and, if so, move it to the new |
409 // location. | 406 // location. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 // Read master_preferences copied beside chrome.exe at install. | 648 // Read master_preferences copied beside chrome.exe at install. |
652 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); | 649 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
653 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); | 650 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); |
654 CreateOrUpdateShortcuts( | 651 CreateOrUpdateShortcuts( |
655 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); | 652 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
656 | 653 |
657 UpdateDefaultBrowserBeaconForPath(chrome_exe); | 654 UpdateDefaultBrowserBeaconForPath(chrome_exe); |
658 } | 655 } |
659 | 656 |
660 } // namespace installer | 657 } // namespace installer |
OLD | NEW |