I don't think it should be "lockPref" like autoconfig. With autoconfig, it's a function call.
With the default pref files, you're specifying a preference.
so:
locked_pref("foo", "bar")
makes more sense it that context (the same as user_pref)
Looking through the code, it looks like you've assumed that if a pref is locked, it becomes a default as well, is that correct?
The code looks good to me, but I'm not the right person to do this.
I think this is a good solution to the problem you are seeing and makes it a lot easier for enterprises to lock prefs, so this would be a good thing to have.
This is a fly by night review.
I don't think it should be "lockPref" like autoconfig. With autoconfig, it's a function call.
With the default pref files, you're specifying a preference.
so:
locked_pref("foo", "bar")
makes more sense it that context (the same as user_pref)
Looking through the code, it looks like you've assumed that if a pref is locked, it becomes a default as well, is that correct?
The code looks good to me, but I'm not the right person to do this.
I think this is a good solution to the problem you are seeing and makes it a lot easier for enterprises to lock prefs, so this would be a good thing to have.