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

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: Fixing comments; minor rearrangements. 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
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..eab20335d02c6ee7801bdcd115206e350494b36a 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,18 @@ 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;
+ components.push_back(dist->GetBaseAppId());
gab 2012/11/08 00:10:58 Append ShellUtil::GetUserSpecificRegistrySuffix()
huangs 2012/11/08 00:26:02 From F2F, append => string contatenation (not push
+ properties->set_app_id(ShellUtil::BuildAppModelId(components));
+ }
}
} // namespace installer
« chrome/installer/setup/uninstall.cc ('K') | « 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