| 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 #include <winuser.h> | 10 #include <winuser.h> |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 void HandleActiveSetupForBrowser(const FilePath& installation_root, | 674 void HandleActiveSetupForBrowser(const FilePath& installation_root, |
| 675 const Product& chrome, | 675 const Product& chrome, |
| 676 bool force) { | 676 bool force) { |
| 677 DCHECK(chrome.is_chrome()); | 677 DCHECK(chrome.is_chrome()); |
| 678 // Only create shortcuts on Active Setup if the first run sentinel is not | 678 // Only create shortcuts on Active Setup if the first run sentinel is not |
| 679 // present for this user (as some shortcuts used to be installed on first | 679 // present for this user (as some shortcuts used to be installed on first |
| 680 // run and this could otherwise re-install shortcuts for users that have | 680 // run and this could otherwise re-install shortcuts for users that have |
| 681 // already deleted them in the past). | 681 // already deleted them in the past). |
| 682 FilePath first_run_sentinel; | 682 FilePath first_run_sentinel; |
| 683 InstallUtil::GetSentinelFilePath( | 683 InstallUtil::GetSentinelFilePath( |
| 684 chrome::kFirstRunSentinel, chrome.distribution(), &first_run_sentinel); | 684 chrome::kFirstRunSentinel, true, chrome.distribution(), |
| 685 &first_run_sentinel); |
| 685 // Decide whether to create the shortcuts or simply replace existing | 686 // Decide whether to create the shortcuts or simply replace existing |
| 686 // shortcuts; if the decision is to create them, only shortcuts whose matching | 687 // shortcuts; if the decision is to create them, only shortcuts whose matching |
| 687 // all-users shortcut isn't present on the system will be created. | 688 // all-users shortcut isn't present on the system will be created. |
| 688 InstallShortcutOperation install_operation = | 689 InstallShortcutOperation install_operation = |
| 689 (!force && file_util::PathExists(first_run_sentinel) ? | 690 (!force && file_util::PathExists(first_run_sentinel) ? |
| 690 INSTALL_SHORTCUT_REPLACE_EXISTING : | 691 INSTALL_SHORTCUT_REPLACE_EXISTING : |
| 691 INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL); | 692 INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL); |
| 692 | 693 |
| 693 // Read master_preferences copied beside chrome.exe at install. | 694 // Read master_preferences copied beside chrome.exe at install. |
| 694 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); | 695 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
| 695 FilePath chrome_exe(installation_root.Append(kChromeExe)); | 696 FilePath chrome_exe(installation_root.Append(kChromeExe)); |
| 696 CreateOrUpdateShortcuts( | 697 CreateOrUpdateShortcuts( |
| 697 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); | 698 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
| 698 } | 699 } |
| 699 | 700 |
| 700 } // namespace installer | 701 } // namespace installer |
| OLD | NEW |