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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/chrome_app_host_distribution.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/chrome_app_host_operations.h" 5 #include "chrome/installer/util/chrome_app_host_operations.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/common/chrome_switches.h"
11 #include "chrome/installer/util/browser_distribution.h"
10 #include "chrome/installer/util/channel_info.h" 12 #include "chrome/installer/util/channel_info.h"
11 #include "chrome/installer/util/helper.h" 13 #include "chrome/installer/util/helper.h"
12 #include "chrome/installer/util/master_preferences.h" 14 #include "chrome/installer/util/master_preferences.h"
13 #include "chrome/installer/util/master_preferences_constants.h" 15 #include "chrome/installer/util/master_preferences_constants.h"
16 #include "chrome/installer/util/shell_util.h"
14 #include "chrome/installer/util/util_constants.h" 17 #include "chrome/installer/util/util_constants.h"
15 18
16 namespace installer { 19 namespace installer {
17 20
18 void ChromeAppHostOperations::ReadOptions( 21 void ChromeAppHostOperations::ReadOptions(
19 const MasterPreferences& prefs, 22 const MasterPreferences& prefs,
20 std::set<std::wstring>* options) const { 23 std::set<std::wstring>* options) const {
21 DCHECK(options); 24 DCHECK(options);
22 25
23 bool pref_value; 26 bool pref_value;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 111
109 bool ChromeAppHostOperations::ShouldCreateUninstallEntry( 112 bool ChromeAppHostOperations::ShouldCreateUninstallEntry(
110 const std::set<std::wstring>& options) const { 113 const std::set<std::wstring>& options) const {
111 return (options.find(kOptionAppHostIsLauncher) != options.end()); 114 return (options.find(kOptionAppHostIsLauncher) != options.end());
112 } 115 }
113 116
114 void ChromeAppHostOperations::AddDefaultShortcutProperties( 117 void ChromeAppHostOperations::AddDefaultShortcutProperties(
115 BrowserDistribution* dist, 118 BrowserDistribution* dist,
116 const FilePath& target_exe, 119 const FilePath& target_exe,
117 ShellUtil::ShortcutProperties* properties) const { 120 ShellUtil::ShortcutProperties* properties) const {
118 NOTREACHED() << "App Host does not create shortcuts."; 121 if (!properties->has_target())
122 properties->set_target(target_exe);
123 if (!properties->has_arguments()) {
124 CommandLine app_host_args(CommandLine::NO_PROGRAM);
125 app_host_args.AppendSwitch(::switches::kShowAppList);
126 properties->set_arguments(app_host_args.GetCommandLineString());
127 }
128 if (!properties->has_app_id()) {
129 std::vector<string16> components;
130 string16 suffix;
131 ShellUtil::GetUserSpecificRegistrySuffix(&suffix);
132 string16 base_app_id(dist->GetBaseAppId());
133 base_app_id.append(suffix);
134 components.push_back(base_app_id);
135 properties->set_app_id(ShellUtil::BuildAppModelId(components));
136 }
119 } 137 }
120 138
121 } // namespace installer 139 } // namespace installer
OLDNEW
« 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