Theoretical Aspects of Electrodeposition in Charged Porous Media