Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: net/proxy/proxy_resolver_winhttp.cc

Issue 149525: Remove the concept of threading from ProxyService, and move it into the Proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add missing header for mac Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_winhttp.cc
===================================================================
--- net/proxy/proxy_resolver_winhttp.cc (revision 21630)
+++ net/proxy/proxy_resolver_winhttp.cc (working copy)
@@ -45,7 +45,7 @@
}
ProxyResolverWinHttp::ProxyResolverWinHttp()
- : ProxyResolver(true), session_handle_(NULL) {
+ : ProxyResolver(false /*expects_pac_bytes*/), session_handle_(NULL) {
}
ProxyResolverWinHttp::~ProxyResolverWinHttp() {
@@ -53,8 +53,9 @@
}
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 @@
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 @@
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,
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698