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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER; | 274 ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER; |
275 FilePath uninstall_shortcut_path; | 275 FilePath uninstall_shortcut_path; |
276 ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist, | 276 ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist, |
277 shortcut_level, &uninstall_shortcut_path); | 277 shortcut_level, &uninstall_shortcut_path); |
278 uninstall_shortcut_path = uninstall_shortcut_path.Append( | 278 uninstall_shortcut_path = uninstall_shortcut_path.Append( |
279 dist->GetUninstallLinkName() + installer::kLnkExt); | 279 dist->GetUninstallLinkName() + installer::kLnkExt); |
280 file_util::Delete(uninstall_shortcut_path, false); | 280 file_util::Delete(uninstall_shortcut_path, false); |
281 | 281 |
282 if (installer_state.system_install()) { | 282 if (installer_state.system_install()) { |
283 ShellUtil::RemoveShortcut( | 283 ShellUtil::RemoveShortcut( |
284 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, chrome_exe.value(), | 284 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, chrome_exe, |
285 ShellUtil::SYSTEM_LEVEL, NULL); | 285 ShellUtil::SYSTEM_LEVEL, NULL); |
286 } | 286 } |
287 } | 287 } |
288 | 288 |
289 // Returns the appropriate shortcut operations for App Launcher, | 289 // Returns the appropriate shortcut operations for App Launcher, |
290 // based on state of installation and master_preferences. | 290 // based on state of installation and master_preferences. |
291 installer::InstallShortcutOperation GetAppLauncherShortcutOperation( | 291 installer::InstallShortcutOperation GetAppLauncherShortcutOperation( |
292 const InstallationState& original_state, | 292 const InstallationState& original_state, |
293 const InstallerState& installer_state) { | 293 const InstallerState& installer_state) { |
294 const installer::ProductState* original_app_host_state = | 294 const installer::ProductState* original_app_host_state = |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL); | 691 INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL); |
692 | 692 |
693 // Read master_preferences copied beside chrome.exe at install. | 693 // Read master_preferences copied beside chrome.exe at install. |
694 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); | 694 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
695 FilePath chrome_exe(installation_root.Append(kChromeExe)); | 695 FilePath chrome_exe(installation_root.Append(kChromeExe)); |
696 CreateOrUpdateShortcuts( | 696 CreateOrUpdateShortcuts( |
697 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); | 697 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
698 } | 698 } |
699 | 699 |
700 } // namespace installer | 700 } // namespace installer |
OLD | NEW |