Mayor Pete Buttigieg was all smiles as he showed Mark Zuckerberg around South Bend, Indiana, proudly leading the Facebook C.E.O.—and Harvard contemporary—on a tour of a long-vacant former Studebaker factory that had been re-purposed as a tech hub. Two years later, however, Buttigieg is a presidential candidate, and he is considerably less cheerful when I ask whether he considers Facebook a force for good in the world. “Like any major change in society, it’s done a lot of good, and it’s done a lot of harm,” he says. “I think as the tech industry, including Facebook, matures, they’re going to have to really reckon with what they’ve created. But I also think it’s the case that when they make some of these corporate-policy decisions, they’re basically making public-policy decisions. That’s partly a failure in the political space. We should have created more boundaries early on, and not expected the tech companies to be able to figure this out, and then be mad when they don’t do a great job.”

The rise of digital, small-dollar fund-raising has made the pursuit of whales less important. And tech’s leaders are “politically radioactive” after the 2016 election and data-privacy scandals, one Democratic strategist says. Yet Buttigieg is hardly the only Democratic contender trying to finesse a relationship with the tech industry. On the one hand, most are bashing the sector as a monopoly that’s overdue for regulation. On the other, most remain eager to raise money from its fabulously rich, mostly liberal executives. The way each candidate chooses to dance between rhetoric and political reality when dealing with Big Tech says a great deal about their larger strategies.

At one end of the spectrum is Elizabeth Warren, who has called for breaking up giants like Amazon, Apple, Facebook, and Google. In the middle is Kamala Harris, who has talked tough about the industry, but has also been the recipient of the most maximum donations from executives of Silicon Valley’s Big Four companies, and who counts powerful venture capitalists Sam Altman and Ron Conway among her supporters. “I think a smart politician can engage Silicon Valley to raise money while at the same time saying, ‘Listen, you’ve got to clean up your act, and we need to conduct a significant amount of government oversight.’ Those are not mutually exclusive concepts,” says Rufus Gifford, who was national finance director for Barack Obama’s 2012 re-election campaign. “The senators, in particular, have to figure out how to walk that line, and the best example right now is Kamala, because she not only represents California, she’s a San Franciscan, and she raises a lot of money out there.” Harris grilled Zuckerberg at a Senate hearing last year, and a San Francisco Democratic strategist describes the industry’s feelings about her as decidedly mixed. “She’s never presented herself as the tech person,” the consultant says. “But, at a minimum, they’re going to need to continue to deal with her as a home-state senator.”

The tech-friendliest candidate is Cory Booker, who has personal relationships with Valley players dating back to his days as a Stanford student; the New Jersey senator’s current boosters include LinkedIn co-founder Reid Hoffman (who also wrote a $2,800 first-quarter check to Amy Klobuchar). On policy, though, Andrew Yang has struck a chord by championing universal basic income. “If you want to take it at its most cynical, that’s in part because there’s an understanding that if we automate everything, there will be no customers to buy our products, unless they have money,” a tech investor says. “Of the ‘outsiders,’ I hear people talking more about Yang than Bernie.”