I was always taught that men take their hats off indoors, women may keep theirs on. In fact, my mum says that when she was young, women ~had~ to cover their heads in (Catholic) church and would be given a tissue to pin to their hair if they forgot their hat.