We analyze a model of a quality-constrained monopolist's product line decision that encompasses a variety of important examples of second-degree price discrimination, including intertemporal price discrimination, coupons, advance purchase discounts, versioning of information goods, and damaged goods. We derive necessary and sufficient conditions for price discrimination to be profitable that generalize existing results in the literature. Specifically, we show that when a continuum of product qualities are feasible, price discrimination is profitable if and only if the ratio of the marginal social value from an increase in quality to the total social value of the good is increasing in consumers' willingness to pay. Unlike third-degree price discrimination, we show that second-degree price discrimination may result in a Pareto improvement. However, in general the welfare effects are ambiguous.