Rule 26-710 (i) of the Canadian Electrical Code states:

A receptacle shall not be placed in a cabinet, cupboard or similar enclosure except where:
(i) The receptacle is part of a factory built enclosure.
(ii)The receptacle is provided for use with a specific type of appliance that is INTENDED FOR USE WITHIN THE ENCLOSURE.
(iii)The receptacle is intended for use with a microwave oven; and..

(j) Except for cord connected dishwashers, in line water heaters, garbage disposal units, and other similar appliances, receptacles installed in cupboards, cabinets or similar enclosures in accordance with paragraph (i)(ii) SHALL BE DE-ENERGIZED UNLESS THE ENCLOSURE DOOR IS IN THE FULLY OPEN POSITION.

So, the way I understand it, you may have a receptacle installed in a cupboard or cabinet, but unless its a dishwasher, garburetor, or the like, the receptacle MUST be de-energized unless the door to the cabinet is wide open, and that shaver chargers and the like are not intended to be used IN such enclosures, and even if you were to, they wouldn't charge with the door closed anyway.
A hair dryer or curling iron could be stored and plugged in but as stated, the receptacle would have to be de-energized unless the door is wide open, not partially open or closed down on the cord.

A.D