diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-03 22:10:28 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-03 22:10:28 +0000 |
commit | c113b2176d7e2230ab4830ccdb2b2e04eb141f1c (patch) | |
tree | fe75864eb318a6911874b508ab1686a57a0630f3 /chrome/installer/util/shell_util.cc | |
parent | 06860a0a47ebde09b6901039397c7c1f50b3d3eb (diff) | |
download | chromium_src-c113b2176d7e2230ab4830ccdb2b2e04eb141f1c.zip chromium_src-c113b2176d7e2230ab4830ccdb2b2e04eb141f1c.tar.gz chromium_src-c113b2176d7e2230ab4830ccdb2b2e04eb141f1c.tar.bz2 |
Chrome updates should not change shortcut icon if there is an index specified in prefs file.
BUG=none
TEST=Specify a chrome with alternative icon (using master prefs), install an update and make sure the icon doesnt change.
Review URL: http://codereview.chromium.org/455041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/shell_util.cc')
-rw-r--r-- | chrome/installer/util/shell_util.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index d4b39cc..82d0fb5b 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -759,15 +759,15 @@ bool ShellUtil::UpdateChromeShortcut(const std::wstring& chrome_exe, bool create_new) { std::wstring chrome_path = file_util::GetDirectoryFromPath(chrome_exe); + 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); 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 @@ -783,7 +783,7 @@ bool ShellUtil::UpdateChromeShortcut(const std::wstring& chrome_exe, NULL, // arguments description.c_str(), // description chrome_exe.c_str(), // icon file - 0, // icon index + icon_index, // icon index chrome::kBrowserAppID); // app id } } |