Oh yeah. Plug up both sides of the barrel with cotton balls so as to keep the vinegar from affecting the grooves of your barrel. Good idea to give it a GOOD cleaning after you're done with all of this.
You forgot one step you should soak the barrel in water and baking soda after you take it out of the vinegar and scrub it. This will neutralize the acid from the vinigar and then you many polish. And for everyone out there that keeps saying that the coating on the barrel of flocks protects it from rusting and it's the tenefer that protects. Get better informed the tenefer on glocks is a treatment to the actual metal not the coating and the barrel can still rust on a coated barrel if not properly maintained like any other metal. I've polished many glock barrels and slides and have yet to see one come back to me with rust. Like I tell everyone like any firearm with any type of coating always keep your gun lightly oiled as it should be either way. Just my 2 cents
Glock barrels do not have bluing. They are coated, vinegar will not get through the coating. It even takes some time with sandpaper or even sand blasting. The best way to get a shinny barrel for a glock is to buy an aftermarket barrel.
I got the Glock armors course FROM Glock. I know the barrels are coated. I have a good idea of how hard this coating is and what it takes to get it off. And yes you can sand the barrel but if you don't know or have alot of skill just get an aftermarket barrel. It will save you time, money, and the headache.