If it was an oxygen fire in the cockpit the pilot on whose side it occurred would not be able to use his oxygen mask, even as a smoke protector. He would be subject to smoke inhalation, and perhaps depressurization, depending on whether or not the pressure vessel was breached.