In the fall of 2008, Roger Ailes, the head of Fox News, went to his boss, Rupert Murdoch, with two complaints: he had heard that Mr. Murdoch was considering endorsing Barack Obama for president in The New York Post, and he had read a book excerpt in Vanity Fair suggesting that Mr.