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

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

Issue 4342001: Refactoring the master_preferences functions.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/master_preferences_unittest.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 64604)
+++ chrome/installer/util/shell_util.cc (working copy)
@@ -30,6 +30,7 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/master_preferences.h"
+#include "chrome/installer/util/master_preferences_constants.h"
#include "installer_util_strings.h"
@@ -782,12 +783,10 @@
FilePath prefs_path(chrome_path);
prefs_path = prefs_path.AppendASCII(installer_util::kDefaultMasterPrefs);
- scoped_ptr<DictionaryValue> prefs(
- installer_util::ParseDistributionPreferences(prefs_path));
+ installer_util::MasterPreferences prefs(prefs_path);
int icon_index = dist->GetIconIndex();
- installer_util::GetDistroIntegerPreference(prefs.get(),
- installer_util::master_preferences::kChromeShortcutIconIndex,
- &icon_index);
+ prefs.GetInt(installer_util::master_preferences::kChromeShortcutIconIndex,
+ &icon_index);
if (create_new) {
return file_util::CreateShortcutLink(
chrome_exe.c_str(), // target
« no previous file with comments | « chrome/installer/util/master_preferences_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698