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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER; | 254 ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER; |
255 base::FilePath uninstall_shortcut_path; | 255 base::FilePath uninstall_shortcut_path; |
256 ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist, | 256 ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist, |
257 shortcut_level, &uninstall_shortcut_path); | 257 shortcut_level, &uninstall_shortcut_path); |
258 uninstall_shortcut_path = uninstall_shortcut_path.Append( | 258 uninstall_shortcut_path = uninstall_shortcut_path.Append( |
259 dist->GetUninstallLinkName() + installer::kLnkExt); | 259 dist->GetUninstallLinkName() + installer::kLnkExt); |
260 file_util::Delete(uninstall_shortcut_path, false); | 260 file_util::Delete(uninstall_shortcut_path, false); |
261 | 261 |
262 if (installer_state.system_install()) { | 262 if (installer_state.system_install()) { |
263 ShellUtil::RemoveShortcut( | 263 ShellUtil::RemoveShortcut( |
264 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, chrome_exe, | 264 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, |
265 ShellUtil::SYSTEM_LEVEL, NULL); | 265 ShellUtil::SYSTEM_LEVEL, chrome_exe); |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 // Returns the appropriate shortcut operations for App Launcher, | 269 // Returns the appropriate shortcut operations for App Launcher, |
270 // based on state of installation and master_preferences. | 270 // based on state of installation and master_preferences. |
271 installer::InstallShortcutOperation GetAppLauncherShortcutOperation( | 271 installer::InstallShortcutOperation GetAppLauncherShortcutOperation( |
272 const InstallationState& original_state, | 272 const InstallationState& original_state, |
273 const InstallerState& installer_state) { | 273 const InstallerState& installer_state) { |
274 const installer::ProductState* original_app_host_state = | 274 const installer::ProductState* original_app_host_state = |
275 original_state.GetProductState(installer_state.system_install(), | 275 original_state.GetProductState(installer_state.system_install(), |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 if (app_host_path.empty()) | 689 if (app_host_path.empty()) |
690 return false; | 690 return false; |
691 | 691 |
692 CommandLine cmd(app_host_path); | 692 CommandLine cmd(app_host_path); |
693 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); | 693 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); |
694 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); | 694 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); |
695 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 695 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
696 } | 696 } |
697 | 697 |
698 } // namespace installer | 698 } // namespace installer |
OLD | NEW |