Outside linebacker Ahmad Brooks has signed a contract extension with the San Francisco 49ers through the 2017 season, the team announced Tuesday.