They say the officer was waiting in line at the restaurant on Shady Grove Road when Nyziere London, 21, of Coatesville, Pa. approached him without warning and struck him in the face twice.
Another officer who was in the restaurant at the register ran to help him, but the man kept trying to attack the officer while he was being taken into custody.
After more officers responded to the scene, the alleged attacker was taken into custody.
London was charged with second-degree assault and resisting arrest.
The investigation has not discovered any prior connection between the assailant and the officer.
London is jailed without bond.
The officer is a 26-year veteran. His injuries are not life threatening, police say.