Bug 1176159 (part 1) - Remove pref_SaveTypes. r=bsmedberg.

Because SAVE_ALL is the only value ever used.
This commit is contained in:
Nicholas Nethercote 2015-06-18 16:44:35 -07:00
parent ec9df1cf53
commit 38c2aad78a
3 changed files with 2 additions and 11 deletions

View File

@ -960,7 +960,6 @@ Preferences::WritePrefFile(nsIFile* aFile)
memset(valueArray, 0, gHashTable->EntryCount() * sizeof(char*));
pref_saveArgs saveArgs;
saveArgs.prefArray = valueArray;
saveArgs.saveTypes = SAVE_ALL;
// get the lines that we're supposed to be writing to the file
PL_DHashTableEnumerate(gHashTable, pref_savePref, &saveArgs);

View File

@ -343,13 +343,8 @@ pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, uint32_t i, void *arg)
pref->flags & PREF_STICKY_DEFAULT)) {
sourcePref = &pref->userPref;
} else {
if (argData->saveTypes == SAVE_ALL_AND_DEFAULTS) {
prefPrefix.AssignLiteral("pref(\"");
sourcePref = &pref->defaultPref;
}
else
// do not save default prefs that haven't changed
return PL_DHASH_NEXT;
// do not save default prefs that haven't changed
return PL_DHASH_NEXT;
}
// strings are in quotes!

View File

@ -19,12 +19,9 @@ class PrefSetting;
}
}
enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS };
// Passed as the arg to pref_savePref
struct pref_saveArgs {
char **prefArray;
pref_SaveTypes saveTypes;
};
PLDHashOperator