| Index: chrome/installer/util/shell_util.cc
|
| diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
|
| index d157f02fe367930b14d2b95073f896415c6d1cb1..10355b630d0f1240f421849d999c5f8c1bab0e53 100644
|
| --- a/chrome/installer/util/shell_util.cc
|
| +++ b/chrome/installer/util/shell_util.cc
|
| @@ -25,6 +25,7 @@
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/installer/util/browser_distribution.h"
|
| #include "chrome/installer/util/install_util.h"
|
| +#include "chrome/installer/util/master_preferences.h"
|
|
|
| #include "installer_util_strings.h"
|
|
|
| @@ -768,14 +769,23 @@ bool ShellUtil::UpdateChromeShortcut(const std::wstring& chrome_exe,
|
| 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
|
|
|