(1) In all cases where costs are paid by the defendant as a condition for dismissal of charges pursuant to a plea negotiation;
(2) In all cases where the defendant agrees to pay the costs in exchange for a dismissal of charges; and
(3) In all cases where the defendant is convicted before a judge or jury.