WASHINGTON (CBS SF / CNN) — Sen. Kamala Harris of California was among three potential 2020 presidential candidates who went on the attack against President Donald Trump — and previewed their own agendas — on Tuesday in the Senate Judiciary Committee’s confirmation hearing for Trump’s nominee for attorney general, William Barr.

Harris questioned the effectiveness of Trump’s calls for a border wall. New Jersey Sen. Cory Booker grilled Barr on racial inequalities in the criminal justice system. And Minnesota Sen. Amy Klobuchar pressed Barr on Trump’s attacks on news organizations.

With Republicans holding a Senate majority, Barr’s confirmation is all but certain. Still, the hearing showcased how the 2020 Democratic presidential race is playing out in high-profile moments in the Senate — much like Barack Obama and Hillary Clinton used Senate hearings as anti-Iraq war launchpads 12 years earlier.

William Barr, nominee to be US Attorney General, testifies during a Senate Judiciary Committee confirmation hearing on Capitol Hill in Washington, DC, January 15, 2019. (SAUL LOEB/AFP/Getty Images)

William Barr, nominee to be US Attorney General, testifies during a Senate Judiciary Committee confirmation hearing on Capitol Hill in Washington, DC, January 15, 2019. (SAUL LOEB/AFP/Getty Images)

Klobuchar highlighted Trump’s attacks on journalists. She also pointed to the death of Washington Post journalist Jamal Khashoggi in a Saudi Arabian consulate in Turkey.

“If you’re confirmed, will the Justice Department jail reporters for doing their jobs?” Klobuchar asked.

After a lengthy pause, Barr said that he could “conceive of situations” in which news organizations had “run through a red flag or something like that” in which journalists could be held in contempt.

Klobuchar said she’d like Barr to respond in writing, “because that was very concerning.”

Harris spent four minutes probing Barr about whether he would recuse himself from oversight of special counsel Robert Mueller’s investigation.

But Barr wouldn’t commit to following the advice of the Justice Department’s ethics officials if they recommended that he recuse himself.

When Harris pressed him on the circumstances under which he wouldn’t follow such advice, Barr would only say, “If I disagreed with them.”

She also pressed Barr on his support for Trump’s calls for a wall along the US-Mexico border.

“Particularly on the subject of drug trafficking, are you aware that most of the drugs that are trafficked into the United States enter through ports of entry?” Harris asked. She later urged Barr to visit ports of entry when he said he hadn’t done so since he was attorney general for former President George H.W. Bush almost 30 years ago.

Booker’s probing on the topic of criminal justice was one of the hearing’s highlights.

Highlighting his work with Republicans on reforming strict prison sentences that leave non-violent offenders — including disproportionate numbers of minorities — behind bars for years, Booker pressed Barr to review more recent studies that countered his conclusions about mass incarceration from the early 1990s.

Booker said under the current criminal justice system, it’s “better if you’re rich and guilty than if you’re poor and innocent.” And he placed much of the blame on Barr.

“You literally wrote the book on mass incarceration,” he said, referring to a 1992 report by Barr called “The Case for More Incarceration.”

“Then,” Barr responded, suggesting his views had changed.

He extracted some concessions from Barr. “I think that the heavy drug penalties, especially on crack and other things, have harmed the black community,” Barr said at one point.

Booker also got Barr to agree to a one-on-one meeting to further discuss the subject.

Booker also pressed Barr on marijuana policy — and got the answer he wanted to hear.

Asked whether the Justice Department would continue to stand aside as states legalize marijuana — even though doing so violates federal law — Barr said he’ll follow the precedent of former President Barack Obama’s administration and is “not going to go after” companies involved in marijuana production and sales.

Barr later gave the same answer when Harris raised the issue.

“To the extent people are complying with the state laws — distribution and production and so forth — we’re not going to go after that,” he said.

© Copyright 2019 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.