Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2916)

Unified Diff: chrome/installer/util/chrome_app_host_operations.cc

Issue 11359013: Adding App Launcher shortcuts on install. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/chrome_app_host_distribution.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3c56a07c496cc695210fa578dcb289ea027a7c5f 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 base_app_id(dist->GetBaseAppId());
+ base_app_id.append(suffix);
+ components.push_back(base_app_id);
+ properties->set_app_id(ShellUtil::BuildAppModelId(components));
+ }
}
} // namespace installer
« no previous file with comments | « chrome/installer/util/chrome_app_host_distribution.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698