disable_all_hosts should be public.
Add "enable_all_hosts" and unify duplicated code.