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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 void CleanupLegacyShortcuts(const InstallerState& installer_state, | 250 void CleanupLegacyShortcuts(const InstallerState& installer_state, |
251 BrowserDistribution* dist, | 251 BrowserDistribution* dist, |
252 const base::FilePath& chrome_exe) { | 252 const base::FilePath& chrome_exe) { |
253 ShellUtil::ShellChange shortcut_level = installer_state.system_install() ? | 253 ShellUtil::ShellChange shortcut_level = installer_state.system_install() ? |
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 base::Delete(uninstall_shortcut_path, false); |
261 | 261 |
262 if (installer_state.system_install()) { | 262 if (installer_state.system_install()) { |
263 ShellUtil::RemoveShortcuts( | 263 ShellUtil::RemoveShortcuts( |
264 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, | 264 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist, |
265 ShellUtil::SYSTEM_LEVEL, chrome_exe); | 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. |
(...skipping 418 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 |