Chromium Code Reviews| Index: chrome/installer/util/chrome_app_host_operations.cc |
| diff --git a/chrome/installer/util/chrome_app_host_operations.cc b/chrome/installer/util/chrome_app_host_operations.cc |
| index b35bfd3ccf97cfd5bd16d6a9689fd64bd4367e2d..8b0c89f0bfc8fbde04069e9b3c1770e98c4979c1 100644 |
| --- a/chrome/installer/util/chrome_app_host_operations.cc |
| +++ b/chrome/installer/util/chrome_app_host_operations.cc |
| @@ -7,10 +7,13 @@ |
| #include "base/command_line.h" |
| #include "base/file_path.h" |
| #include "base/logging.h" |
| +#include "chrome/common/chrome_switches.h" |
| +#include "chrome/installer/util/browser_distribution.h" |
| #include "chrome/installer/util/channel_info.h" |
| #include "chrome/installer/util/helper.h" |
| #include "chrome/installer/util/master_preferences.h" |
| #include "chrome/installer/util/master_preferences_constants.h" |
| +#include "chrome/installer/util/shell_util.h" |
| #include "chrome/installer/util/util_constants.h" |
| namespace installer { |
| @@ -115,7 +118,22 @@ void ChromeAppHostOperations::AddDefaultShortcutProperties( |
| BrowserDistribution* dist, |
| const FilePath& target_exe, |
| ShellUtil::ShortcutProperties* properties) const { |
| - NOTREACHED() << "App Host does not create shortcuts."; |
| + if (!properties->has_target()) |
| + properties->set_target(target_exe); |
| + if (!properties->has_arguments()) { |
| + CommandLine app_host_args(CommandLine::NO_PROGRAM); |
| + app_host_args.AppendSwitch(::switches::kShowAppList); |
| + properties->set_arguments(app_host_args.GetCommandLineString()); |
| + } |
| + if (!properties->has_app_id()) { |
| + std::vector<string16> components; |
| + string16 suffix; |
| + ShellUtil::GetUserSpecificRegistrySuffix(&suffix); |
| + string16 baseAppId(dist->GetBaseAppId()); |
|
gab
2012/11/08 00:40:07
nit: base_app_id (always user lower case, separate
huangs
2012/11/08 00:44:47
Done.
|
| + baseAppId.append(suffix); |
| + components.push_back(baseAppId); |
| + properties->set_app_id(ShellUtil::BuildAppModelId(components)); |
| + } |
| } |
| } // namespace installer |