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

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

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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_v8_tracing_unittest.cc ('k') | net/tools/gdig/gdig.cc » ('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) 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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // 101 //
102 // ([<scheme>=][<scheme>"://"]<server>[":"<port>]) 102 // ([<scheme>=][<scheme>"://"]<server>[":"<port>])
103 // 103 //
104 // Based on this description, ProxyInfo::UseNamedProxy() isn't 104 // Based on this description, ProxyInfo::UseNamedProxy() isn't
105 // going to handle all the variations (in particular <scheme>=). 105 // going to handle all the variations (in particular <scheme>=).
106 // 106 //
107 // However in practice, it seems that WinHTTP is simply returning 107 // However in practice, it seems that WinHTTP is simply returning
108 // things like "foopy1:80;foopy2:80". It strips out the non-HTTP 108 // things like "foopy1:80;foopy2:80". It strips out the non-HTTP
109 // proxy types, and stops the list when PAC encounters a "DIRECT". 109 // proxy types, and stops the list when PAC encounters a "DIRECT".
110 // So UseNamedProxy() should work OK. 110 // So UseNamedProxy() should work OK.
111 results->UseNamedProxy(WideToASCII(info.lpszProxy)); 111 results->UseNamedProxy(base::UTF16ToASCII(info.lpszProxy));
112 break; 112 break;
113 default: 113 default:
114 NOTREACHED(); 114 NOTREACHED();
115 rv = ERR_FAILED; 115 rv = ERR_FAILED;
116 } 116 }
117 117
118 FreeInfo(&info); 118 FreeInfo(&info);
119 return rv; 119 return rv;
120 } 120 }
121 121
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 void ProxyResolverWinHttp::CloseWinHttpSession() { 167 void ProxyResolverWinHttp::CloseWinHttpSession() {
168 if (session_handle_) { 168 if (session_handle_) {
169 WinHttpCloseHandle(session_handle_); 169 WinHttpCloseHandle(session_handle_);
170 session_handle_ = NULL; 170 session_handle_ = NULL;
171 } 171 }
172 } 172 }
173 173
174 } // namespace net 174 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_v8_tracing_unittest.cc ('k') | net/tools/gdig/gdig.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698