| Index: net/http/http_stream_factory.cc
|
| diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
|
| index e97323ddb964bac0a962744310c53b1965e4be7b..e94e5fadc5e9523852fdca50ae604689b79b8e12 100644
|
| --- a/net/http/http_stream_factory.cc
|
| +++ b/net/http/http_stream_factory.cc
|
| @@ -95,6 +95,20 @@
|
| RewriteHost(http_server), alternative_service_info_vector);
|
| }
|
|
|
| +GURL HttpStreamFactory::ApplyHostMappingRules(const GURL& url,
|
| + HostPortPair* endpoint) {
|
| + const HostMappingRules* mapping_rules = GetHostMappingRules();
|
| + if (mapping_rules && mapping_rules->RewriteHost(endpoint)) {
|
| + url::Replacements<char> replacements;
|
| + const std::string port_str = base::UintToString(endpoint->port());
|
| + replacements.SetPort(port_str.c_str(), url::Component(0, port_str.size()));
|
| + replacements.SetHost(endpoint->host().c_str(),
|
| + url::Component(0, endpoint->host().size()));
|
| + return url.ReplaceComponents(replacements);
|
| + }
|
| + return url;
|
| +}
|
| +
|
| HttpStreamFactory::HttpStreamFactory() {}
|
|
|
| url::SchemeHostPort HttpStreamFactory::RewriteHost(
|
|
|