Gov Gavin Newsom called it a "long overdue measure to protect young Californians".