Gov. Jerry Brown signed a new law that will allow hundreds of thousands of young illegal immigrants to obtain driver’s licenses and vetoed another that would have restricted sheriffs from helping federal authorities detain undocumented Californians for potential deportation. His actions, announced Sunday as the deadline neared to finish work on nearly 1,000 bills sent to him by the Legislature this year, followed an intense week of protests, prayer vigils and lobbying by immigrant advocacy groups. The governor also revived a tax break for Hollywood, allowed juvenile killers serving life in prison a chance for release and outlawed intended to turn gay children straight. The laws take effect Jan. 1. The immigration bills sparked the most controversy.