There are two ways to perform a factory reset on HTC One. from the setting or by using hardware buttons (Volume, Power button). To erase and delete data on your HTC One with hardware buttons, do as follows:
1. Press and hold the "Volume Down" button, and after that press and hold the "Power" button.
2. Keep holding the buttons, until you see the three Android images on the screen
3. Release the buttons (Both "Volume Down" and "Power" buttons)
4. Now select "Factory Reset" by pressing "Volume Down"
5. Press the "Power Button" to start the process
Remember to use this way if you can not turn on the phone or access the setting menu for any reason. Otherwise try this way: How to Do Factory Reset on HTC One