Such sheriff shall be responsible for the safe keeping of the persons so committed to such jail, in the same manner and to the same extent, as if he were sheriff of the county for whose use such jail shall have been designated, and with respect to the persons so committed, shall be deemed the sheriff of such county.