Old ammunition, in particular that surplussed from former soviet satelite states contains potassium chlorate in their primers. Much old ammo contains this, however to the the massive amounts of the surplussed soviet stuff it is more often encountered.
This forms chloride salts upon firing, which if allowed to remain in the barrel can accelerate corrosion, especially in humid areas.
See the first part of working on this is to determine what the material causing the corrosive salts to form is, KClO3.
A potential chlorate test is:
"Colorimetric test for chlorate
This test will indicate the presence of very slight chlorate contamination. It is convenient for testing pyrotechnic mixtures since nitrate, chloride, nor perchlorate will disturb the test.
1. Take approximately 100 mg of phenylanthranilic acid, and put this in a test tube.
2. Add 0.5 ml of concentrated sulphuric acid an shake to dissolve the phenylanthranilic acid. This usually takes a few minutes.
3. Place a 500 mg sample of the material to be tested in a test tube and add 2 ml of water. Shake well to dissolve all chlorate possibly present. Filter if insoluble purities are present.
4. To this sample solution, add a few drops of the phenylanthranilic acid solution. An orange or red color indicates presence of chlorate. A solution of pure perchlorate or chloride merely gives a white precipitate. "
However you must decide for yourself via tests and calibration, whether the other materials in the primer will interfere in the test. I think the commonly used primer material was a mix of lead azide and lead styphnate. Also, removal of the primer material from the primer cup will be an issue, as they are explosive. Best to do under water.