diff options
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/util/shell_util.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index c61251b..e3c86f0 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -31,6 +31,9 @@ namespace { +const int kDefaultIconIndex = 0; +const int kSxSIconIndex = 4; + // This class represents a single registry entry. The objective is to // encapsulate all the registry entries required for registering Chrome at one // place. This class can not be instantiated outside the class and the objects @@ -499,8 +502,11 @@ bool ShellUtil::CreateChromeQuickLaunchShortcut(const std::wstring& chrome_exe, } std::wstring ShellUtil::GetChromeIcon(const std::wstring& chrome_exe) { + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); std::wstring chrome_icon(chrome_exe); - chrome_icon.append(L",0"); + chrome_icon.append(L","); + chrome_icon.append(IntToWString(dist->ShouldUseAlternateIcon() ? + kSxSIconIndex : kDefaultIconIndex)); return chrome_icon; } @@ -764,13 +770,15 @@ bool ShellUtil::UpdateChromeShortcut(const std::wstring& chrome_exe, const std::wstring& shortcut, const std::wstring& description, bool create_new) { + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); std::wstring chrome_path = file_util::GetDirectoryFromPath(chrome_exe); FilePath prefs_path(chrome_path); prefs_path = prefs_path.AppendASCII(installer_util::kDefaultMasterPrefs); scoped_ptr<DictionaryValue> prefs( installer_util::ParseDistributionPreferences(prefs_path)); - int icon_index = 0; + int icon_index = dist->ShouldUseAlternateIcon() ? + kSxSIconIndex : kDefaultIconIndex; installer_util::GetDistroIntegerPreference(prefs.get(), installer_util::master_preferences::kChromeShortcutIconIndex, &icon_index); |