Some contour before, some after. Same results can be had either way. Heat treat and/or lapping to get to where they want to be for straightness, uniformity and spec. Different barrel makers do things in different orders, and not all even do the same things. Cut rifled vs. button, small production vs. large scale, make them cheap vs make them good and so on and so on.
There isn't a simple answer to your question. It just depends on who is making the barrel, how they are making it and what their desired end result is - like cheap, or good. Some makers have different processes and steps depending on who the customer is or which product line the barrel is intended for.
A good barrel is going to be hand lapped into spec.
- DAA