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

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

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 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_winhttp.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 ProxyResolverWinHttp::~ProxyResolverWinHttp() { 51 ProxyResolverWinHttp::~ProxyResolverWinHttp() {
52 CloseWinHttpSession(); 52 CloseWinHttpSession();
53 } 53 }
54 54
55 int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url, 55 int ProxyResolverWinHttp::GetProxyForURL(const GURL& query_url,
56 ProxyInfo* results, 56 ProxyInfo* results,
57 CompletionCallback* /*callback*/, 57 CompletionCallback* /*callback*/,
58 RequestHandle* /*request*/, 58 RequestHandle* /*request*/,
59 LoadLog* /*load_log*/) { 59 const BoundNetLog& /*net_log*/) {
60 // If we don't have a WinHTTP session, then create a new one. 60 // If we don't have a WinHTTP session, then create a new one.
61 if (!session_handle_ && !OpenWinHttpSession()) 61 if (!session_handle_ && !OpenWinHttpSession())
62 return ERR_FAILED; 62 return ERR_FAILED;
63 63
64 // If we have been given an empty PAC url, then use auto-detection. 64 // If we have been given an empty PAC url, then use auto-detection.
65 // 65 //
66 // NOTE: We just use DNS-based auto-detection here like Firefox. We do this 66 // NOTE: We just use DNS-based auto-detection here like Firefox. We do this
67 // to avoid WinHTTP's auto-detection code, which while more featureful (it 67 // to avoid WinHTTP's auto-detection code, which while more featureful (it
68 // supports DHCP based auto-detection) also appears to have issues. 68 // supports DHCP based auto-detection) also appears to have issues.
69 // 69 //
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 void ProxyResolverWinHttp::CloseWinHttpSession() { 170 void ProxyResolverWinHttp::CloseWinHttpSession() {
171 if (session_handle_) { 171 if (session_handle_) {
172 WinHttpCloseHandle(session_handle_); 172 WinHttpCloseHandle(session_handle_);
173 session_handle_ = NULL; 173 session_handle_ = NULL;
174 } 174 }
175 } 175 }
176 176
177 } // namespace net 177 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698