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

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

Issue 1556018: Add support for attaching custom parameters to NetLog events. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address willchan's comments Created 10 years, 8 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/base/net_log_util_unittest.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('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_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
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
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
OLDNEW
« no previous file with comments | « net/base/net_log_util_unittest.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698