OLD | NEW |
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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 FreeInfo(&info); | 118 FreeInfo(&info); |
119 return rv; | 119 return rv; |
120 } | 120 } |
121 | 121 |
122 void ProxyResolverWinHttp::CancelRequest(RequestHandle request) { | 122 void ProxyResolverWinHttp::CancelRequest(RequestHandle request) { |
123 // This is a synchronous ProxyResolver; no possibility for async requests. | 123 // This is a synchronous ProxyResolver; no possibility for async requests. |
124 NOTREACHED(); | 124 NOTREACHED(); |
125 } | 125 } |
126 | 126 |
| 127 void ProxyResolverWinHttp::CancelSetPacScript() { |
| 128 NOTREACHED(); |
| 129 } |
| 130 |
127 int ProxyResolverWinHttp::SetPacScript( | 131 int ProxyResolverWinHttp::SetPacScript( |
128 const scoped_refptr<ProxyResolverScriptData>& script_data, | 132 const scoped_refptr<ProxyResolverScriptData>& script_data, |
129 CompletionCallback* /*callback*/) { | 133 CompletionCallback* /*callback*/) { |
130 if (script_data->type() == ProxyResolverScriptData::TYPE_AUTO_DETECT) { | 134 if (script_data->type() == ProxyResolverScriptData::TYPE_AUTO_DETECT) { |
131 pac_url_ = GURL("http://wpad/wpad.dat"); | 135 pac_url_ = GURL("http://wpad/wpad.dat"); |
132 } else { | 136 } else { |
133 pac_url_ = script_data->url(); | 137 pac_url_ = script_data->url(); |
134 } | 138 } |
135 return OK; | 139 return OK; |
136 } | 140 } |
(...skipping 19 matching lines...) Expand all Loading... |
156 } | 160 } |
157 | 161 |
158 void ProxyResolverWinHttp::CloseWinHttpSession() { | 162 void ProxyResolverWinHttp::CloseWinHttpSession() { |
159 if (session_handle_) { | 163 if (session_handle_) { |
160 WinHttpCloseHandle(session_handle_); | 164 WinHttpCloseHandle(session_handle_); |
161 session_handle_ = NULL; | 165 session_handle_ = NULL; |
162 } | 166 } |
163 } | 167 } |
164 | 168 |
165 } // namespace net | 169 } // namespace net |
OLD | NEW |