| Index: chrome/browser/web_applications/web_app_win.cc
|
| diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc
|
| index b1aca7d247fb499305aeb0c11ff90deab2b17377..0e83647360b7bc85fb12ff1d923a14619396fadf 100644
|
| --- a/chrome/browser/web_applications/web_app_win.cc
|
| +++ b/chrome/browser/web_applications/web_app_win.cc
|
| @@ -229,7 +229,7 @@ bool CreatePlatformShortcuts(
|
| return false;
|
|
|
| // Working directory.
|
| - FilePath chrome_folder = chrome_exe.DirName();
|
| + FilePath chrome_folder(chrome_exe.DirName());
|
|
|
| CommandLine cmd_line(CommandLine::NO_PROGRAM);
|
| cmd_line = ShellIntegration::CommandLineArgsForLauncher(shortcut_info.url,
|
| @@ -247,10 +247,9 @@ bool CreatePlatformShortcuts(
|
| description.resize(MAX_PATH - 1);
|
|
|
| // Generates app id from web app url and profile path.
|
| - std::string app_name =
|
| - web_app::GenerateApplicationNameFromInfo(shortcut_info);
|
| - string16 app_id = ShellIntegration::GetAppModelIdForProfile(
|
| - UTF8ToUTF16(app_name), shortcut_info.profile_path);
|
| + std::string app_name(web_app::GenerateApplicationNameFromInfo(shortcut_info));
|
| + string16 app_id(ShellIntegration::GetAppModelIdForProfile(
|
| + UTF8ToUTF16(app_name), shortcut_info.profile_path));
|
|
|
| FilePath shortcut_to_pin;
|
| bool success = true;
|
| @@ -268,15 +267,16 @@ bool CreatePlatformShortcuts(
|
| StringPrintf(" (%d)", unique_number));
|
| }
|
|
|
| + file_util::ShortcutProperties shortcut_properties;
|
| + shortcut_properties.set_target(chrome_exe.value());
|
| + shortcut_properties.set_working_dir(chrome_folder.value());
|
| + shortcut_properties.set_arguments(wide_switches);
|
| + shortcut_properties.set_description(description);
|
| + shortcut_properties.set_icon(icon_file.value(), 0);
|
| + shortcut_properties.set_app_id(app_id);
|
| + shortcut_properties.set_dual_mode(false);
|
| success = file_util::CreateOrUpdateShortcutLink(
|
| - chrome_exe.value().c_str(),
|
| - shortcut_file.value().c_str(),
|
| - chrome_folder.value().c_str(),
|
| - wide_switches.c_str(),
|
| - description.c_str(),
|
| - icon_file.value().c_str(),
|
| - 0,
|
| - app_id.c_str(),
|
| + shortcut_file.value(), shortcut_properties,
|
| file_util::SHORTCUT_CREATE_ALWAYS) && success;
|
|
|
| // Any shortcut would work for the pinning. We use the first one.
|
|
|