Older style 2-prong outlets in the home near a sink or in a bathroom can be dangerous because they are not grounded and have no means of protecting you from shock. Not only should outlets near sinks be grounded, but they should be of a type called GFCI or Ground Fault Circuit Interrupter.
However, Code allows you to replace these old outlets with a GFCI outlet if no means to ground the receptacle is available.
Converting an old non-grounded 2 prong receptacle into a GFCI outlet like the photo is easy and improves your home's safety. It still won't be grounded but still provides protection from electrical shock because of the outlet's special design.
The tutorial 2-Prong Outlet Upgrade shows you how to easily modernize your old ungrounded electrical outlet. It's shockingly easy!