Having recorded a 7.71 ERA in his previous four starts, Cain (8-13) rebounded by walking none -- the third time in 32 starts he has managed that feat -- and striking out seven in seven innings.
"You want those starts all the time," Cain said. "I have to get to mentally being more focused."
Facing the D-backs for the first time this season, Cain lapsed twice in identical fashion. He surrendered first-pitch leadoff home runs to Chris Snyder in the second inning and Stephen Drew in the sixth. Snyder's drive, said Cain, came on a fastball, while Drew mashed a lifeless changeup.
"It probably ended up being like a [batting-practice] heater. It just floated up there," Cain said disdainfully.
But Cain remained bereft of offensive support, as was the case last season and for much of this year. This marked the seventh time in 2008 that the Giants have been blanked while he's in the game.
The right-hander reacted with typical stoicism.
"It's not like anybody's trying to pick on me," Cain said. "It'll make me stronger down the road in my career. I'll get used to pitching in these tight games. That's how you get better, I think, learning to pitch in these 1-0, 2-1 games."
Through seven innings, the Giants mustered one hit off Haren, Pablo Sandoval's two-out single in the fourth inning, and moved only one runner to second base when Eugenio Velez drew a two-out walk and stole second base in the fifth.
The Giants also hit three line drives in the general direction of first baseman Chad Tracy, who turned them all into outs. He gloved Sandoval's first-inning smash to start a double play, snared Velez's scorcher in the third inning and dove to grab another bolt by Sandoval in the seventh.
"That changed the game a little bit," Giants manager Bruce Bochy said.
Haren ended the game stubbornly after Randy Winn and Sandoval singled with one out in the ninth. After Bengie Molina flied out, rookie Travis Ishikawa became Haren's 12th strikeout victim by flailing at a 2-2 slider.
"I kind of went up there with a plan and it seemed like he was reading my mind," Ishikawa said. "He struck me out twice on the fastball inside. Even the one that I hit to second base [in the fifth inning] was pretty much in, too. Even though he missed on the previous pitch, I thought for sure he was coming back in with the fastball. I made the mistake of seeing fastball out of his hand before I really saw the pitch."
But another member of San Francisco's 17-man rookie brigade distinguished himself. Conor Gillaspie stroked his first Major League hit, a pinch-hit single to right field with two outs in the eighth inning. With Nate Schierholtz unavailable due to soreness in his right shoulder and pectoral muscle, Bochy summoned Gillaspie, another left-handed batter, who connected solidly on a 1-1 slider.
"I didn't know what was going on. Everything happened so fast," said Gillaspie, who had only one previous at-bat.
"I'm just happy to be out there. You let your instincts take over when you get out there. That's all you can do at this level."
Although the Giants are on the brink of mathematical elimination in the NL West, trailing Los Angeles by 11 games with 11 to play, they'll have something to play for Wednesday night. They'll face Arizona ace Brandon Webb (20-7), Tim Lincecum's most formidable rival for the league's Cy Young Award.
"I thought I heard somebody saying something about getting some good at-bats against him and scoring some runs," Ishikawa said. "If we can help Timmy out, that would be great."