B2G/gecko/toolkit/content/UpdateChannel.jsm
/**
   * Read the update channel from defaults only.  We do this to ensure that
   * the channel is tightly coupled with the application and does not apply
   * to other instances of the application that may use the same profile.
   */
Read the update channel from defaults only.  We do this to ensure that
the channel is tightly coupled with the application and does not apply
to other instances of the application that may use the same profile.
Read the update channel from defaults only . We do this to ensure that the channel is tightly coupled with the application and does not apply to other instances of the application that may use the same profile .
function UpdateChannel_get() {
    let channel = "@MOZ_UPDATE_CHANNEL@";
    let defaults = Services.prefs.getDefaultBranch(null);
    try {
      channel = defaults.getCharPref("app.update.channel");
    } catch (e) {
    }
    try {
      let partners = Services.prefs.getChildList("app.partner.").sort();
      if (partners.length) {
        channel += "-cck";
        partners.forEach(function (prefName) {
          channel += "-" + Services.prefs.getCharPref(prefName);
        });
      }
    } catch (e) {
      Cu.reportError(e);
    }
    return channel;
  }
function UpdateChannel_get ( ) { let channel = "@MOZ_UPDATE_CHANNEL@" ; let defaults = Services . prefs . getDefaultBranch ( null ) ; try { channel = defaults . getCharPref ( "app.update.channel" ) ; } catch ( e ) { } try { let partners = Services . prefs . getChildList ( "app.partner." ) . sort ( ) ; if ( partners . length ) { channel += "-cck" ; partners . forEach ( function ( prefName ) { channel += "-" + Services . prefs . getCharPref ( prefName ) ; } ) ; } } catch ( e ) { Cu . reportError ( e ) ; } return channel ; }
Read the update channel from defaults only.
Read the update channel from defaults only .
// use default value when pref not found