Read from prefs set by setPref in getVariable
Categories
(Firefox :: Nimbus Desktop Client, task, P5)
Tracking
()
People
(Reporter: beth, Unassigned)
References
(Blocks 6 open bugs)
Details
Attachments
(1 obsolete file)
As part of replacing isEarlyStartup, we need a mechanism for reading variables before the store is ready. This can be accomplished via reading prefs set via setPref directly, (i.e., with Services.prefs.getBoolPref et al) but Nimbus loses the ability to track how and when features are being interacted with.
In the future, we will be adding feature activation events (triggered the first time a feature is accessed through nimbus) and so we want to encourage people to interact through this API where possible, instead of directly reading prefs.
We can accomplish the same features of isEarlyStartup via the following pseudocode:
getVariable(varName):
if store is not ready:
if varName is a setPref variable on the user branch:
return the value of that pref // default branch values (i.e., via firefox.js) can be used to provide defaults
throw NS_ERROR_UNAVAILABLE
return value from store as usual
Reporter | ||
Updated•11 months ago
|
Reporter | ||
Updated•11 months ago
|
Reporter | ||
Comment 1•10 months ago
|
||
We actually cannot use this behaviour only during startup, because it will become inconsistent if the pref has a default value.
Reporter | ||
Comment 2•10 months ago
|
||
Updated•10 months ago
|
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Reporter | ||
Comment 3•4 months ago
|
||
It is unclear if we are going to be implementing feature activation events, so this is on hold
Description
•