Where appellant pleaded guilty with a Harvey waiver, imposition of the upper term sentence did not violate Apprendi/Blakely. Appellant entered into a plea bargain, under the terms of which he pleaded no contest to attempted murder and an arming enhancement in exchange for dismissal of several other counts with a waiver pursuant to People v. Harvey. He was sentenced to the upper term in prison (9 years) for the offense, and the upper term (10 years) for the firearm enhancement. He obtained a certificate of probable cause, and contended on appeal that his upper-term sentence violated his right to a jury trial under Apprendi/Blakely/Cunningham. The appellate court rejected his argument, finding that appellant effectively stipulated to the relevant facts necessary to impose the upper term, thereby waiving his right to have a jury trial on those facts. The Harvey waiver entered into was explained in broad terms, and allowed the court to consider the prior criminal history and entire factual background of the case, including any unfiled or dismissed charges. All of the aggravating factors cited by the trial court in imposing the upper term were encompassed in appellant’s waiver. Since appellant specifically agreed the court could consider those facts for purposes of aggravating his sentence, he cannot now complain of error under Blakely and Apprendi.