Still, some Democrats demanded answers about what he knew about the leak cases.
Senator Chuck Schumer of New York, the majority leader, called on Mr. Demers on Sunday to testify before Congress.
When Mr. Demers became the head of the National Security Division on Feb. 22, 2018, he was praised by both Democrats and Republicans, who noted that he had worked under administrations of both parties.
The confirmation is his third stint at the department. From 2006, when the National Security Division was created, to 2009, Mr. Demers was part of its leadership team. He had previously worked in the department’s Office of Legal Counsel, essentially the government’s lead legal adviser, and in the office of the deputy attorney general.
He graduated from Harvard Law School, where he and Mr. Carlin were friends and classmates.
As the head of the National Security Division, he will likely best be known for his work to combat the threat of Chinese intellectual property theft and espionage.
When the White House announced Mr. Olsen’s nomination to take over the division, Mr. Demers said in an email to his staff that “Matt is the right person to lead this division,” according to a copy obtained by The Times.
Before joining Uber, Mr. Olsen worked as a federal prosecutor in the U.S. attorney’s office in Washington, served in top roles at the F.B.I. and the National Security Agency and as director of the National Counterterrorism Center during the Obama administration.
Mr. Lesko has served as the acting U.S. attorney for the Eastern District of New York since March, replacing Seth DuCharme. Mr. Lesko was a prosecutor in the district from 2002 to 2009 and returned to the office in 2018.
Nicole Hong contributed reporting from New York.