summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_resolver_winhttp.cc
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 22:43:12 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 22:43:12 +0000
commit620f57148c311c4dc2cf680a4a5861fbdcd29993 (patch)
tree93408ed35ebbaccd8f45734c7267392c81d71ca9 /net/proxy/proxy_resolver_winhttp.cc
parent289fdf862c649d17ddb2e08295304efb98f641f6 (diff)
downloadchromium_src-620f57148c311c4dc2cf680a4a5861fbdcd29993.zip
chromium_src-620f57148c311c4dc2cf680a4a5861fbdcd29993.tar.gz
chromium_src-620f57148c311c4dc2cf680a4a5861fbdcd29993.tar.bz2
Better match IE's proxy settings.
* When BOTH autodetect and custom PAC script are given, try both. * Use successful PAC parsing as the heuristic for determining when a script is valid (rather than first-request). * Only apply the proxy bypass list when using non-PAC. The high level explanation on how this works: http://sites.google.com/a/chromium.org/dev/developers/design-documents/proxy-settings-fallback BUG= http://crbug.com/18271, http://crbug.com/9985 TEST=unit tests. Review URL: http://codereview.chromium.org/160510 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_resolver_winhttp.cc')
-rw-r--r--net/proxy/proxy_resolver_winhttp.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc
index d4bca9c5..4c0848d 100644
--- a/net/proxy/proxy_resolver_winhttp.cc
+++ b/net/proxy/proxy_resolver_winhttp.cc
@@ -70,8 +70,7 @@ int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
options.fAutoLogonIfChallenged = FALSE;
options.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
std::wstring pac_url_wide = ASCIIToWide(pac_url_.spec());
- options.lpszAutoConfigUrl =
- pac_url_wide.empty() ? L"http://wpad/wpad.dat" : pac_url_wide.c_str();
+ options.lpszAutoConfigUrl = pac_url_wide.c_str();
WINHTTP_PROXY_INFO info = {0};
DCHECK(session_handle_);
@@ -140,8 +139,11 @@ void ProxyResolverWinHttp::CancelRequest(RequestHandle request) {
NOTREACHED();
}
-void ProxyResolverWinHttp::SetPacScriptByUrlInternal(const GURL& pac_url) {
- pac_url_ = pac_url;
+int ProxyResolverWinHttp::SetPacScript(const GURL& pac_url,
+ const std::string& /*pac_bytes*/,
+ CompletionCallback* /*callback*/) {
+ pac_url_ = pac_url.is_valid() ? pac_url : GURL("http://wpad/wpad.dat");
+ return OK;
}
bool ProxyResolverWinHttp::OpenWinHttpSession() {