This source file includes following definitions.
- GetInstance
- GetHostResolver
- SetHostResolverForTesting
#include "extensions/browser/api/dns/host_resolver_wrapper.h"
namespace extensions {
HostResolverWrapper::HostResolverWrapper() : resolver_(NULL) {}
HostResolverWrapper* HostResolverWrapper::GetInstance() {
return Singleton<extensions::HostResolverWrapper>::get();
}
net::HostResolver* HostResolverWrapper::GetHostResolver(
net::HostResolver* real_resolver) {
return resolver_ ? resolver_ : real_resolver;
}
void HostResolverWrapper::SetHostResolverForTesting(
net::HostResolver* mock_resolver) {
resolver_ = mock_resolver;
}
}