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

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

Issue 11183007: Removing "WinHttpGetProxyForUrl failed" message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 session_handle_, ASCIIToWide(query_url.spec()).c_str(), &options, &info); 69 session_handle_, ASCIIToWide(query_url.spec()).c_str(), &options, &info);
70 if (!ok) { 70 if (!ok) {
71 if (ERROR_WINHTTP_LOGIN_FAILURE == GetLastError()) { 71 if (ERROR_WINHTTP_LOGIN_FAILURE == GetLastError()) {
72 options.fAutoLogonIfChallenged = TRUE; 72 options.fAutoLogonIfChallenged = TRUE;
73 ok = WinHttpGetProxyForUrl( 73 ok = WinHttpGetProxyForUrl(
74 session_handle_, ASCIIToWide(query_url.spec()).c_str(), 74 session_handle_, ASCIIToWide(query_url.spec()).c_str(),
75 &options, &info); 75 &options, &info);
76 } 76 }
77 if (!ok) { 77 if (!ok) {
78 DWORD error = GetLastError(); 78 DWORD error = GetLastError();
79 LOG(ERROR) << "WinHttpGetProxyForUrl failed: " << error;
80 // If we got here because of RPC timeout during out of process PAC 79 // If we got here because of RPC timeout during out of process PAC
81 // resolution, no further requests on this session are going to work. 80 // resolution, no further requests on this session are going to work.
82 if (ERROR_WINHTTP_TIMEOUT == error || 81 if (ERROR_WINHTTP_TIMEOUT == error ||
83 ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR == error) { 82 ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR == error) {
84 CloseWinHttpSession(); 83 CloseWinHttpSession();
85 } 84 }
86 return ERR_FAILED; // TODO(darin): Bug 1189288: translate error code. 85 return ERR_FAILED; // TODO(darin): Bug 1189288: translate error code.
87 } 86 }
88 } 87 }
89 88
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 169 }
171 170
172 void ProxyResolverWinHttp::CloseWinHttpSession() { 171 void ProxyResolverWinHttp::CloseWinHttpSession() {
173 if (session_handle_) { 172 if (session_handle_) {
174 WinHttpCloseHandle(session_handle_); 173 WinHttpCloseHandle(session_handle_);
175 session_handle_ = NULL; 174 session_handle_ = NULL;
176 } 175 }
177 } 176 }
178 177
179 } // namespace net 178 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698