A corrosion inhibitor is a chemical compound that, when added to a liquid or gas, decreases the corrosion rate of a material, typically a metal or an alloy. The effectiveness of a corrosion inhibitor depends on fluid composition, quantity of water, and flow regime. A common mechanism for inhibiting corrosion involves formation of a coating, often a passivation layer, which prevents access of the corrosive substance to the metal. Permanent treatments such as chrome plating are not generally considered inhibitors, however. Instead corrosion inhibitors are additives to the fluids that surround the metal or related object.