Commit 804803ea authored by Wojciech Dzierżanowski's avatar Wojciech Dzierżanowski Committed by Commit Bot

Add missing MappedHostResolver overrides

Save for remapping hosts according to the rules, MappedHostResolver
should be a transparent wrapper around the "real" resolver.  Thus, it
must forward all HostResolver methods to the real resolver.

Change-Id: I34deed523b3cb690d450599c89bfd7f2184e843d
Reviewed-on: https://chromium-review.googlesource.com/1209402
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589150}
parent 104a2ebe
...@@ -114,6 +114,24 @@ bool MappedHostResolver::GetNoIPv6OnWifi() { ...@@ -114,6 +114,24 @@ bool MappedHostResolver::GetNoIPv6OnWifi() {
return impl_->GetNoIPv6OnWifi(); return impl_->GetNoIPv6OnWifi();
} }
void MappedHostResolver::SetRequestContext(URLRequestContext* request_context) {
impl_->SetRequestContext(request_context);
}
void MappedHostResolver::AddDnsOverHttpsServer(std::string spec,
bool use_post) {
impl_->AddDnsOverHttpsServer(spec, use_post);
}
void MappedHostResolver::ClearDnsOverHttpsServers() {
impl_->ClearDnsOverHttpsServers();
}
const std::vector<DnsConfig::DnsOverHttpsServerConfig>*
MappedHostResolver::GetDnsOverHttpsServersForTesting() const {
return impl_->GetDnsOverHttpsServersForTesting();
}
int MappedHostResolver::ApplyRules(RequestInfo* info) const { int MappedHostResolver::ApplyRules(RequestInfo* info) const {
HostPortPair host_port(info->host_port_pair()); HostPortPair host_port(info->host_port_pair());
if (rules_.RewriteHost(&host_port)) { if (rules_.RewriteHost(&host_port)) {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector>
#include "net/base/completion_once_callback.h" #include "net/base/completion_once_callback.h"
#include "net/base/host_mapping_rules.h" #include "net/base/host_mapping_rules.h"
...@@ -65,15 +66,18 @@ class NET_EXPORT MappedHostResolver : public HostResolver { ...@@ -65,15 +66,18 @@ class NET_EXPORT MappedHostResolver : public HostResolver {
HostCache::EntryStaleness* stale_info, HostCache::EntryStaleness* stale_info,
const NetLogWithSource& source_net_log) override; const NetLogWithSource& source_net_log) override;
void SetDnsClientEnabled(bool enabled) override; void SetDnsClientEnabled(bool enabled) override;
HostCache* GetHostCache() override; HostCache* GetHostCache() override;
bool HasCached(base::StringPiece hostname, bool HasCached(base::StringPiece hostname,
HostCache::Entry::Source* source_out, HostCache::Entry::Source* source_out,
HostCache::EntryStaleness* stale_out) const override; HostCache::EntryStaleness* stale_out) const override;
std::unique_ptr<base::Value> GetDnsConfigAsValue() const override; std::unique_ptr<base::Value> GetDnsConfigAsValue() const override;
void SetNoIPv6OnWifi(bool no_ipv6_on_wifi) override; void SetNoIPv6OnWifi(bool no_ipv6_on_wifi) override;
bool GetNoIPv6OnWifi() override; bool GetNoIPv6OnWifi() override;
void SetRequestContext(URLRequestContext* request_context) override;
void AddDnsOverHttpsServer(std::string spec, bool use_post) override;
void ClearDnsOverHttpsServers() override;
const std::vector<DnsConfig::DnsOverHttpsServerConfig>*
GetDnsOverHttpsServersForTesting() const override;
private: private:
class AlwaysErrorRequestImpl; class AlwaysErrorRequestImpl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment