Add --no-proxy-server switch.
This commit is contained in:
parent
59398bc24b
commit
d136c44792
1 changed files with 16 additions and 9 deletions
|
@ -63,6 +63,10 @@ namespace {
|
||||||
// proxy connection, and the endpoint host in a SOCKS proxy connection).
|
// proxy connection, and the endpoint host in a SOCKS proxy connection).
|
||||||
const char kHostRules[] = "host-rules";
|
const char kHostRules[] = "host-rules";
|
||||||
|
|
||||||
|
// Don't use a proxy server, always make direct connections. Overrides any
|
||||||
|
// other proxy server flags that are passed.
|
||||||
|
const char kNoProxyServer[] = "no-proxy-server";
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
URLRequestContextGetter::URLRequestContextGetter(
|
URLRequestContextGetter::URLRequestContextGetter(
|
||||||
|
@ -132,6 +136,9 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
||||||
}
|
}
|
||||||
|
|
||||||
net::DhcpProxyScriptFetcherFactory dhcp_factory;
|
net::DhcpProxyScriptFetcherFactory dhcp_factory;
|
||||||
|
if (command_line.HasSwitch(kNoProxyServer))
|
||||||
|
storage_->set_proxy_service(net::ProxyService::CreateDirect());
|
||||||
|
else
|
||||||
storage_->set_proxy_service(
|
storage_->set_proxy_service(
|
||||||
net::CreateProxyServiceUsingV8ProxyResolver(
|
net::CreateProxyServiceUsingV8ProxyResolver(
|
||||||
proxy_config_service_.release(),
|
proxy_config_service_.release(),
|
||||||
|
|
Loading…
Reference in a new issue