function updateFirebase(callback) {
  var resolver = goog.Promise.withResolver();
  var resolver2 = goog.Promise.withResolver();
  var dbRef;
  getFirebaseRef().then(function(ref) {
    dbRef = ref.child(schema.name());
    dbRef.on('value', function(data) {
      var data2 = callback(/** @type {!Object} */ (data.val()));
      resolver2.resolve(data2);
    });
    resolver2.promise.then(function(data) {
      dbRef.transaction(function() {
        return data;
      }, function(error, committed, snapshot) {
        if (error || !committed) {
          resolver.reject(error);
        }
        resolver.resolve();
      });
    });
  });
  return resolver.promise;
}
@param {function(!Object): !Object} callback
@return {!IThenable}