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_service.h" | 5 #include "net/proxy/proxy_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 const BoundNetLog& net_log) { | 457 const BoundNetLog& net_log) { |
458 // Log the result of the proxy resolution. | 458 // Log the result of the proxy resolution. |
459 if (result_code == OK) { | 459 if (result_code == OK) { |
460 // When full logging is enabled, dump the proxy list. | 460 // When full logging is enabled, dump the proxy list. |
461 if (net_log.HasListener()) { | 461 if (net_log.HasListener()) { |
462 net_log.AddString( | 462 net_log.AddString( |
463 std::string("Resolved proxy list: ") + result->ToPacString()); | 463 std::string("Resolved proxy list: ") + result->ToPacString()); |
464 } | 464 } |
465 result->DeprioritizeBadProxies(proxy_retry_info_); | 465 result->DeprioritizeBadProxies(proxy_retry_info_); |
466 } else { | 466 } else { |
467 net_log.AddStringLiteral( | 467 net_log.AddString(StringPrintf( |
468 "Got an error from proxy resolver, falling-back to DIRECT."); | 468 "Got an error from proxy resolver (%d), falling-back to DIRECT.", |
469 net_log.AddErrorCode(result_code); | 469 result_code)); |
470 | 470 |
471 // Fall-back to direct when the proxy resolver fails. This corresponds | 471 // Fall-back to direct when the proxy resolver fails. This corresponds |
472 // with a javascript runtime error in the PAC script. | 472 // with a javascript runtime error in the PAC script. |
473 // | 473 // |
474 // This implicit fall-back to direct matches Firefox 3.5 and | 474 // This implicit fall-back to direct matches Firefox 3.5 and |
475 // Internet Explorer 8. For more information, see: | 475 // Internet Explorer 8. For more information, see: |
476 // | 476 // |
477 // http://www.chromium.org/developers/design-documents/proxy-settings-fallba
ck | 477 // http://www.chromium.org/developers/design-documents/proxy-settings-fallba
ck |
478 result->UseDirect(); | 478 result->UseDirect(); |
479 result_code = OK; | 479 result_code = OK; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 OnCompletion(result_); | 729 OnCompletion(result_); |
730 } | 730 } |
731 } | 731 } |
732 | 732 |
733 void SyncProxyServiceHelper::OnCompletion(int rv) { | 733 void SyncProxyServiceHelper::OnCompletion(int rv) { |
734 result_ = rv; | 734 result_ = rv; |
735 event_.Signal(); | 735 event_.Signal(); |
736 } | 736 } |
737 | 737 |
738 } // namespace net | 738 } // namespace net |
OLD | NEW |