Penal Code § 1379
CHAPTER 7. Compromising Certain Public Offenses by Leave of the Court
No public offense can be compromised, nor can any proceeding or prosecution for the punishment thereof upon a compromise be stayed, except as provided in this Chapter.