How can USB extension cords affect of USB charging?
There will be a voltage drop across the cable.  Let's make a test case.


length of extension cable: len = 2 m  
gauge of power wires in the cable: 24 AWG, which is typical for USB cables  
worst case charge current: I = 2 A, however this can vary a lot between various portable devices.  The range is between 0.5 A and 2.5 A.


24 AWG has resistance of 25.67 [Ω per 1000 feet] or 0.086 [Ω/m].  Both power and ground return leads need to be taken in account.  The total resistance is R = 2*2*0.086 = 0.342 Ω.  Voltage drop V = IR = 0.685 V per Ohm's law.

Nominally, the spec for the USB supply voltage is 5.00±0.25 V.  Lower supply voltage would probably not degrade your battery, but it may prevent your charger from working in the first place.  Try to get the extension cable with a heavier wire, if your charging current is high.