The veteran quarterback is headed to San Francisco on a one-year deal.