| 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/metrics/histogram.h" | 10 #include "base/metrics/histogram.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 "googleurl/src/gurl.h" | |
| 14 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 15 #include "net/proxy/proxy_info.h" | 14 #include "net/proxy/proxy_info.h" |
| 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 #pragma comment(lib, "winhttp.lib") | 17 #pragma comment(lib, "winhttp.lib") |
| 18 | 18 |
| 19 using base::TimeDelta; | 19 using base::TimeDelta; |
| 20 using base::TimeTicks; | 20 using base::TimeTicks; |
| 21 | 21 |
| 22 namespace net { | 22 namespace net { |
| 23 | 23 |
| 24 static void FreeInfo(WINHTTP_PROXY_INFO* info) { | 24 static void FreeInfo(WINHTTP_PROXY_INFO* info) { |
| 25 if (info->lpszProxy) | 25 if (info->lpszProxy) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 164 } |
| 165 | 165 |
| 166 void ProxyResolverWinHttp::CloseWinHttpSession() { | 166 void ProxyResolverWinHttp::CloseWinHttpSession() { |
| 167 if (session_handle_) { | 167 if (session_handle_) { |
| 168 WinHttpCloseHandle(session_handle_); | 168 WinHttpCloseHandle(session_handle_); |
| 169 session_handle_ = NULL; | 169 session_handle_ = NULL; |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace net | 173 } // namespace net |
| OLD | NEW |