code: function getConfirmation(terria, viewState, confirmConversion, message) {
    if (!confirmConversion) {
      return when(true);
    }
  
    var d = when.defer(); // there's no `when.promise(resolver)` in when 1.7.1
    viewState.notifications.push({
      confirmText: "Upload",
      denyText: "Cancel",
      title: "Use conversion service?",
      message: message,
      confirmAction: function() {
        d.resolve(true);
      },
      denyAction: function() {
        d.resolve(false);
      }
    });
    return d.promise;
  }
docs: /* Returns a promise that returns true if user confirms, or false if they abort.