Safeway Inc.'s moves to write down the value of two of its chains have led the US retail giant to swing to a loss in the last three months of 2009.