In the case of the B737-Classic, the assymetry detection performed isnide the flap position indicator. When the difference between the needles hits a certain degree, a switch inside the indicator is made which shuts a valve preventing further flap extension.
On the B737-Next Gens, the FSEU handles all of this.