| Index: chrome/installer/util/shell_util.cc
|
| diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
|
| index a753f802a160ddf145e294d92f9ec2bf4aed136b..db36e4d7f884ce7b45eaf9746590eec533fb4ff6 100644
|
| --- a/chrome/installer/util/shell_util.cc
|
| +++ b/chrome/installer/util/shell_util.cc
|
| @@ -1728,6 +1728,35 @@ bool ShellUtil::GetShortcutPath(ShellUtil::ShortcutLocation location,
|
| return true;
|
| }
|
|
|
| +bool ShellUtil::MoveExistingShortcut(
|
| + ShellUtil::ShellChange shortcut_level,
|
| + BrowserDistribution* dist,
|
| + const ShellUtil::ShortcutProperties& properties,
|
| + ShellUtil::ShortcutLocation old_location,
|
| + ShellUtil::ShortcutLocation new_location) {
|
| + // Explicitly whitelist locations to which this is applicable.
|
| + if (old_location != SHORTCUT_LOCATION_START_MENU_CHROME_DIR ||
|
| + new_location != SHORTCUT_LOCATION_START_MENU_ROOT) {
|
| + NOTREACHED();
|
| + return false;
|
| + }
|
| +
|
| + base::string16 shortcut_name(
|
| + ExtractShortcutNameFromProperties(dist, properties));
|
| +
|
| + base::FilePath old_shortcut_path;
|
| + base::FilePath new_shortcut_path;
|
| + ShellUtil::GetShortcutPath(
|
| + old_location, dist, shortcut_level, &old_shortcut_path);
|
| + ShellUtil::GetShortcutPath(
|
| + new_location, dist, shortcut_level, &new_shortcut_path);
|
| + old_shortcut_path = old_shortcut_path.Append(shortcut_name);
|
| + new_shortcut_path = new_shortcut_path.Append(shortcut_name);
|
| +
|
| + return !!::MoveFile(old_shortcut_path.value().c_str(),
|
| + new_shortcut_path.value().c_str());
|
| +}
|
| +
|
| bool ShellUtil::CreateOrUpdateShortcut(
|
| ShellUtil::ShortcutLocation location,
|
| BrowserDistribution* dist,
|
|
|