Barry Zito capped the likely end of his San Francisco Giants tenure with a victory.