The deal means that the iconic San Francisco building has just its third owner in its history.