In situ studies of passive film chemistry using x-ray absorption spectroscopy