Corrosion involves two separate processes or half-reactions, oxidation and reduction. Oxidation is the reaction that consumes metal atoms when they corrode, releasing electrons. These electrons are used up in the reduction reaction.
When a metal corrodes in solution, the two halves of the reaction can be separated by large distances. This is unlike oxidation in air, when one reaction occurs at the surface of the film and the other at the surface of the metal, meaning that the reaction sites are always close to each other. In fact, in aqueous solution the reaction separation can be very large and as long as there is both electronic and electrolytic contact between the anodic and cathodic sites, corrosion will occur regardless of separation of the half-reactions.