code: function _convertTask(task, $firebaseUtils) {
      return {
        $progress: function $progress(callback) {
          task.on('state_changed', function () {
            $firebaseUtils.compile(function () {
              callback(_unwrapStorageSnapshot(task.snapshot));
            });
          });
        },
        $error: function $error(callback) {
          task.on('state_changed', null, function (err) {
            $firebaseUtils.compile(function () {
              callback(err);
            });
          });
        },
        $complete: function $complete(callback) {
          task.on('state_changed', null, null, function () {
            $firebaseUtils.compile(function () {
              callback(_unwrapStorageSnapshot(task.snapshot));
            });
          });
        },
        $cancel: task.cancel.bind(task),
        $resume: task.resume.bind(task),
        $pause: task.pause.bind(task),
        then: task.then.bind(task),
        catch: task.catch.bind(task),
        $snapshot: task.snapshot
      };
    }
docs: Take an UploadTask and create an interface for the user to monitor the
  file's upload. The $progress, $error, and $complete methods are provided
  to work with the $digest cycle.
  
  @param task
  @param $firebaseUtils
  @returns A converted task, which contains methods for monitoring the
  upload progress.