| Index: chrome/installer/setup/install.cc
|
| diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
|
| index a076ca3a6efbd8ed4e23c021e2b10544f10d851c..d7d43b77080dea9b171b777e05a62a9eb9c47e23 100644
|
| --- a/chrome/installer/setup/install.cc
|
| +++ b/chrome/installer/setup/install.cc
|
| @@ -70,7 +70,10 @@ void LogShortcutOperation(ShellUtil::ShortcutLocation location,
|
| case ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH:
|
| message.append("Quick Launch ");
|
| break;
|
| - case ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR:
|
| + case ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT:
|
| + message.append("Start menu ");
|
| + break;
|
| + case ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED:
|
| message.append("Start menu/" +
|
| base::UTF16ToUTF8(dist->GetStartMenuShortcutSubfolder(
|
| BrowserDistribution::SUBFOLDER_CHROME)) +
|
| @@ -116,7 +119,7 @@ void LogShortcutOperation(ShellUtil::ShortcutLocation location,
|
| VLOG(1) << message;
|
| }
|
|
|
| -void ExecuteAndLogShortcutOperation(
|
| +bool ExecuteAndLogShortcutOperation(
|
| ShellUtil::ShortcutLocation location,
|
| BrowserDistribution* dist,
|
| const ShellUtil::ShortcutProperties& properties,
|
| @@ -125,7 +128,9 @@ void ExecuteAndLogShortcutOperation(
|
| if (!ShellUtil::CreateOrUpdateShortcut(location, dist, properties,
|
| operation)) {
|
| LogShortcutOperation(location, dist, properties, operation, true);
|
| + return false;
|
| }
|
| + return true;
|
| }
|
|
|
| void AddChromeToMediaPlayerList() {
|
| @@ -434,8 +439,23 @@ void CreateOrUpdateShortcuts(
|
| // remains disabled long term.
|
| start_menu_properties.set_pin_to_start(false);
|
| }
|
| +
|
| + // Move start-menu shortcuts out of the deprecated Chrome specific subfolder.
|
| + // This needs to happen before the shortcut update below or it will fail due
|
| + // to the existing shortcut not being in the location as the new one.
|
| + base::FilePath old_shortcut_path;
|
| + ShellUtil::GetShortcutPath(
|
| + ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED, dist,
|
| + shortcut_level, &old_shortcut_path);
|
| + if (base::PathExists(old_shortcut_path)) {
|
| + ShellUtil::MoveExistingShortcut(
|
| + ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED,
|
| + ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT,
|
| + dist, shortcut_level, start_menu_properties);
|
| + }
|
| +
|
| ExecuteAndLogShortcutOperation(
|
| - ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, dist,
|
| + ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, dist,
|
| start_menu_properties, shortcut_operation);
|
| }
|
|
|
|
|