summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_resolver_winhttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_resolver_winhttp.cc')
-rw-r--r--net/proxy/proxy_resolver_winhttp.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc
index a3ed9fe..d4bca9c5 100644
--- a/net/proxy/proxy_resolver_winhttp.cc
+++ b/net/proxy/proxy_resolver_winhttp.cc
@@ -45,7 +45,7 @@ static void FreeInfo(WINHTTP_PROXY_INFO* info) {
}
ProxyResolverWinHttp::ProxyResolverWinHttp()
- : ProxyResolver(true), session_handle_(NULL) {
+ : ProxyResolver(false /*expects_pac_bytes*/), session_handle_(NULL) {
}
ProxyResolverWinHttp::~ProxyResolverWinHttp() {
@@ -53,8 +53,9 @@ ProxyResolverWinHttp::~ProxyResolverWinHttp() {
}
int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
- const GURL& pac_url,
- ProxyInfo* results) {
+ ProxyInfo* results,
+ CompletionCallback* /*callback*/,
+ RequestHandle* /*request*/) {
// If we don't have a WinHTTP session, then create a new one.
if (!session_handle_ && !OpenWinHttpSession())
return ERR_FAILED;
@@ -68,7 +69,7 @@ int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
WINHTTP_AUTOPROXY_OPTIONS options = {0};
options.fAutoLogonIfChallenged = FALSE;
options.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
- std::wstring pac_url_wide = ASCIIToWide(pac_url.spec());
+ 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();
@@ -134,6 +135,15 @@ int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
return rv;
}
+void ProxyResolverWinHttp::CancelRequest(RequestHandle request) {
+ // This is a synchronous ProxyResolver; no possibility for async requests.
+ NOTREACHED();
+}
+
+void ProxyResolverWinHttp::SetPacScriptByUrlInternal(const GURL& pac_url) {
+ pac_url_ = pac_url;
+}
+
bool ProxyResolverWinHttp::OpenWinHttpSession() {
DCHECK(!session_handle_);
session_handle_ = WinHttpOpen(NULL,