As anyone who's done some shooting quickly finds out, it does not take very many rounds to heat up a barrel to be too hot to touch.
A lot of folks think the 'burning of the propellant, and its subsequent increase in temperature, is entirely what provides the pressure, and so it would make sense that the propellant alone provides all that heat. However, I don't think that's the whole story, as much of the pressure isn't because of the rise in temperature, but because the propellant's large molecules break down into numerous combustion products, and with most (in the case of smokeless powder) of those products being gaseous. A near instant transition from solid to gas generates most of the pressure, so if a propellant somehow burned 'cold' I think it would likely still be quite effective.
Additionally, it takes a surprisingly large amount of force to push a bullet down a barrel. Anyone who's had to clear a squib load can attest that you really have to bang on it to get it out. Some material I've read indicates forces as high as 300 lbf needed to push a bullet along the barrel. There is the friction of the barrel with the sides of the barrel, along with the force needed to deform the bullet into the grooves of the rifling.
So, for a typical long-gun, which effect transfers the most heat to the barrel? Heat from the burnt propellant, or frictional and deformation effects of the bullet traveling through the barrel?
If we want to compare a specific combination, let's say an AR-15 type rifle with a typical 20" barrel and 5.56 ammunition.