I'm in the minority in this Instapundit poll, since I voted that there's "no difference" in the likelihood of a terrorist attack under a McCain or Obama administration. Terrorists are motivated to attack the U.S., with little regard to who's president. (See, e.g., Al Qaeda in the 1990s.) A McCain administration may be more aggressive in fighting terrorists, but whether that would mean fewer terrorist attacks (or more), especially in the short run, is questionable.
The bigger difference in foreign policy between McCain and Obama, I think, involves dealing with other nations. Whoever's the U.S. president, some nations will be tempted to test U.S. resolve, whether it's China threatening Taiwan, Russia threatening Ukraine, or North Korea threatening South Korea. That temptation will be greater if Obama becomes president, bringing little experience and offering a softer approach. McCain, being a familiar figure and a hard-line type, will be in a better position to prevent international tensions from turning into crises.