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

Side by Side Diff: chrome/installer/util/chrome_app_host_operations.cc

Issue 11359133: Add default icon to app_host.exe, and use it in shortcuts during installation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renaming GetChromiumIconString() => GetChromiumIconLocation(). 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
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" 10 #include "chrome/common/chrome_switches.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 ShellUtil::ShortcutProperties* properties) const { 120 ShellUtil::ShortcutProperties* properties) const {
121 if (!properties->has_target()) 121 if (!properties->has_target())
122 properties->set_target(target_exe); 122 properties->set_target(target_exe);
123 123
124 if (!properties->has_arguments()) { 124 if (!properties->has_arguments()) {
125 CommandLine app_host_args(CommandLine::NO_PROGRAM); 125 CommandLine app_host_args(CommandLine::NO_PROGRAM);
126 app_host_args.AppendSwitch(::switches::kShowAppList); 126 app_host_args.AppendSwitch(::switches::kShowAppList);
127 properties->set_arguments(app_host_args.GetCommandLineString()); 127 properties->set_arguments(app_host_args.GetCommandLineString());
128 } 128 }
129 129
130 if (!properties->has_icon()) { 130 if (!properties->has_icon())
131 // Currently the App Launcher icon is inside chrome.exe, which we assume 131 properties->set_icon(target_exe, dist->GetIconIndex());
132 // to be located in the same directory as app_host.exe.
133 // TODO(huangs): Cause the icon to also be embedded in app_host.exe,
134 // and then point at this (as chrome.exe is _not_ in the same folder
135 // for system-level chrome installs, or may even be uninstalled).
136 FilePath chrome_exe(target_exe.DirName().Append(kChromeExe));
137 properties->set_icon(chrome_exe, dist->GetIconIndex());
138 }
139 132
140 if (!properties->has_app_id()) { 133 if (!properties->has_app_id()) {
141 std::vector<string16> components; 134 std::vector<string16> components;
142 components.push_back(dist->GetBaseAppId()); 135 components.push_back(dist->GetBaseAppId());
143 properties->set_app_id(ShellUtil::BuildAppModelId(components)); 136 properties->set_app_id(ShellUtil::BuildAppModelId(components));
144 } 137 }
145 } 138 }
146 139
147 } // namespace installer 140 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/chrome_app_host_distribution.cc ('k') | chrome/installer/util/chrome_frame_distribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698