B2G/gecko/browser/components/migration/src/IEProfileMigrator.js
/**
   * Reads a setting from the Registry and stores the converted result into
   * the appropriate Firefox preference.
   * 
   * @param aPath
   *        Registry path under HKCU.
   * @param aKey
   *        Name of the key.
   * @param aPref
   *        Firefox preference.
   * @param [optional] aTransformFn
   *        Conversion function from the Registry format to the pref format.
   */
Reads a setting from the Registry and stores the converted result into
the appropriate Firefox preference.

@param aPath
Registry path under HKCU.
@param aKey
Name of the key.
@param aPref
Firefox preference.
@param [optional] aTransformFn
Conversion function from the Registry format to the pref format.
Reads a setting from the Registry and stores the converted result into the appropriate Firefox preference . @param aPath Registry path under HKCU . @param aKey Name of the key . @param aPref Firefox preference . @param [ optional ] aTransformFn Conversion function from the Registry format to the pref format .
function S__set(aPath, aKey, aPref, aTransformFn) {
    let value = readRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
                           aPath, aKey);
    if (value === undefined)
      return;
    if (aTransformFn)
      value = aTransformFn(value);
    switch (typeof(value)) {
      case "string":
        Services.prefs.setCharPref(aPref, value);
        break;
      case "number":
        Services.prefs.setIntPref(aPref, value);
        break;
      case "boolean":
        Services.prefs.setBoolPref(aPref, value);
        break;
      default:
        throw new Error("Unexpected value type: " + typeof(value));
    }
  }
function S__set ( aPath , aKey , aPref , aTransformFn ) { let value = readRegKey ( Ci . nsIWindowsRegKey . ROOT_KEY_CURRENT_USER , aPath , aKey ) ; if ( value === undefined ) return ; if ( aTransformFn ) value = aTransformFn ( value ) ; switch ( typeof ( value ) ) { case "string" : Services . prefs . setCharPref ( aPref , value ) ; break ; case "number" : Services . prefs . setIntPref ( aPref , value ) ; break ; case "boolean" : Services . prefs . setBoolPref ( aPref , value ) ; break ; default : throw new Error ( "Unexpected value type: " + typeof ( value ) ) ; } }
Reads a setting from the Registry and stores the converted result into
 the appropriate Firefox preference.
Reads a setting from the Registry and stores the converted result into the appropriate Firefox preference .
// Don't import settings that have never been flipped.