California has passed a bill banning the sale of flavored tobacco products.