| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/proxy/proxy_resolver_winhttp.h" | 5 #include "net/proxy/proxy_resolver_winhttp.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <winhttp.h> | 8 #include <winhttp.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 14 #include "net/proxy/proxy_info.h" | 14 #include "net/proxy/proxy_info.h" |
| 15 #include "net/proxy/proxy_resolver.h" | 15 #include "net/proxy/proxy_resolver.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 #pragma comment(lib, "winhttp.lib") | |
| 19 | |
| 20 using base::TimeDelta; | 18 using base::TimeDelta; |
| 21 using base::TimeTicks; | 19 using base::TimeTicks; |
| 22 | 20 |
| 23 namespace net { | 21 namespace net { |
| 24 namespace { | 22 namespace { |
| 25 | 23 |
| 26 static void FreeInfo(WINHTTP_PROXY_INFO* info) { | 24 static void FreeInfo(WINHTTP_PROXY_INFO* info) { |
| 27 if (info->lpszProxy) | 25 if (info->lpszProxy) |
| 28 GlobalFree(info->lpszProxy); | 26 GlobalFree(info->lpszProxy); |
| 29 if (info->lpszProxyBypass) | 27 if (info->lpszProxyBypass) |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 int ProxyResolverFactoryWinHttp::CreateProxyResolver( | 219 int ProxyResolverFactoryWinHttp::CreateProxyResolver( |
| 222 const scoped_refptr<ProxyResolverScriptData>& pac_script, | 220 const scoped_refptr<ProxyResolverScriptData>& pac_script, |
| 223 scoped_ptr<ProxyResolver>* resolver, | 221 scoped_ptr<ProxyResolver>* resolver, |
| 224 const CompletionCallback& callback, | 222 const CompletionCallback& callback, |
| 225 scoped_ptr<Request>* request) { | 223 scoped_ptr<Request>* request) { |
| 226 resolver->reset(new ProxyResolverWinHttp(pac_script)); | 224 resolver->reset(new ProxyResolverWinHttp(pac_script)); |
| 227 return OK; | 225 return OK; |
| 228 } | 226 } |
| 229 | 227 |
| 230 } // namespace net | 228 } // namespace net |
| OLD | NEW |