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

Side by Side Diff: net/proxy/proxy_resolver_winhttp.cc

Issue 21328: Add support to ProxyService for downloading a PAC script on behalf of the Pro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add missing files (for constructor boolean flag fall-out) Created 11 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_resolver_mac.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/histogram.h" 10 #include "base/histogram.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 static void FreeInfo(WINHTTP_PROXY_INFO* info) { 37 static void FreeInfo(WINHTTP_PROXY_INFO* info) {
38 if (info->lpszProxy) 38 if (info->lpszProxy)
39 GlobalFree(info->lpszProxy); 39 GlobalFree(info->lpszProxy);
40 if (info->lpszProxyBypass) 40 if (info->lpszProxyBypass)
41 GlobalFree(info->lpszProxyBypass); 41 GlobalFree(info->lpszProxyBypass);
42 } 42 }
43 43
44 ProxyResolverWinHttp::ProxyResolverWinHttp() 44 ProxyResolverWinHttp::ProxyResolverWinHttp()
45 : session_handle_(NULL) { 45 : ProxyResolver(true), session_handle_(NULL) {
46 } 46 }
47 47
48 ProxyResolverWinHttp::~ProxyResolverWinHttp() { 48 ProxyResolverWinHttp::~ProxyResolverWinHttp() {
49 CloseWinHttpSession(); 49 CloseWinHttpSession();
50 } 50 }
51 51
52 int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url, 52 int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
53 const GURL& pac_url, 53 const GURL& pac_url,
54 ProxyInfo* results) { 54 ProxyInfo* results) {
55 // If we don't have a WinHTTP session, then create a new one. 55 // If we don't have a WinHTTP session, then create a new one.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 void ProxyResolverWinHttp::CloseWinHttpSession() { 154 void ProxyResolverWinHttp::CloseWinHttpSession() {
155 if (session_handle_) { 155 if (session_handle_) {
156 WinHttpCloseHandle(session_handle_); 156 WinHttpCloseHandle(session_handle_);
157 session_handle_ = NULL; 157 session_handle_ = NULL;
158 } 158 }
159 } 159 }
160 160
161 } // namespace net 161 } // namespace net
162 162
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_mac.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698