B2G/gecko/toolkit/mozapps/update/nsUpdateService.js
/**
   * Handle Observer Service notifications
   * @param   subject
   *          The subject of the notification
   * @param   topic
   *          The notification name
   * @param   data
   *          Additional data
   */
Handle Observer Service notifications
@param   subject
The subject of the notification
@param   topic
The notification name
@param   data
Additional data
Handle Observer Service notifications @param subject The subject of the notification @param topic The notification name @param data Additional data
function AUS_observe(subject, topic, data) {
    switch (topic) {
    case "post-update-processing":
      this._postUpdateProcessing();
      break;
    case "network:offline-status-changed":
      this._offlineStatusChanged(data);
      break;
    case "xpcom-shutdown":
      Services.obs.removeObserver(this, "xpcom-shutdown");
      if (this._retryTimer) {
        this._retryTimer.cancel();
      }
      this.pauseDownload();
      this._downloader = null;
      break;
    }
  }
function AUS_observe ( subject , topic , data ) { switch ( topic ) { case "post-update-processing" : this . _postUpdateProcessing ( ) ; break ; case "network:offline-status-changed" : this . _offlineStatusChanged ( data ) ; break ; case "xpcom-shutdown" : Services . obs . removeObserver ( this , "xpcom-shutdown" ) ; if ( this . _retryTimer ) { this . _retryTimer . cancel ( ) ; } this . pauseDownload ( ) ; this . _downloader = null ; break ; } }
Handle Observer Service notifications
 @param   subject
          The subject of the notification
 @param   topic
          The notification name
 @param   data
          Additional data
Handle Observer Service notifications @param subject The subject of the notification @param topic The notification name @param data Additional data
// Clean up any extant updates // Prevent leaking the downloader (bug 454964)