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

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

Issue 164390: Merge 22314 - Use alternate icon for Chrome shortcuts if specified in master ... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 months 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/master_preferences.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/shell_util.cc
===================================================================
--- chrome/installer/util/shell_util.cc (revision 23179)
+++ chrome/installer/util/shell_util.cc (working copy)
@@ -27,6 +27,7 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/create_reg_key_work_item.h"
#include "chrome/installer/util/install_util.h"
+#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/set_reg_value_work_item.h"
#include "chrome/installer/util/util_constants.h"
@@ -691,14 +692,23 @@
const std::wstring& description,
bool create_new) {
std::wstring chrome_path = file_util::GetDirectoryFromPath(chrome_exe);
+
if (create_new) {
+ FilePath prefs_path(chrome_path);
+ prefs_path = prefs_path.Append(installer_util::kDefaultMasterPrefs);
+ scoped_ptr<DictionaryValue> prefs(
+ installer_util::ParseDistributionPreferences(prefs_path));
+ int icon_index = 0;
+ installer_util::GetDistroIntegerPreference(prefs.get(),
+ installer_util::master_preferences::kChromeShortcutIconIndex,
+ &icon_index);
return file_util::CreateShortcutLink(chrome_exe.c_str(), // target
shortcut.c_str(), // shortcut
chrome_path.c_str(), // working dir
NULL, // arguments
description.c_str(), // description
chrome_exe.c_str(), // icon file
- 0); // icon index
+ icon_index); // icon index
} else {
return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target
shortcut.c_str(), // shortcut
Property changes on: chrome\installer\util\shell_util.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/chrome/installer/util/shell_util.cc:r69-2775
Merged /trunk/src/chrome/installer/util/shell_util.cc:r22314
« no previous file with comments | « chrome/installer/util/master_preferences.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698