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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 LoadLog::AddString( | 491 LoadLog::AddString( |
492 load_log, | 492 load_log, |
493 std::string("Resolved proxy list: ") + result->ToPacString()); | 493 std::string("Resolved proxy list: ") + result->ToPacString()); |
494 } | 494 } |
495 } else { | 495 } else { |
496 LoadLog::AddErrorCode(load_log, result_code); | 496 LoadLog::AddErrorCode(load_log, result_code); |
497 } | 497 } |
498 | 498 |
499 // Clean up the results list. | 499 // Clean up the results list. |
500 if (result_code == OK) | 500 if (result_code == OK) |
501 result->RemoveBadProxies(proxy_retry_info_); | 501 result->DeprioritizeBadProxies(proxy_retry_info_); |
502 | 502 |
503 LoadLog::EndEvent(load_log, LoadLog::TYPE_PROXY_SERVICE); | 503 LoadLog::EndEvent(load_log, LoadLog::TYPE_PROXY_SERVICE); |
504 return result_code; | 504 return result_code; |
505 } | 505 } |
506 | 506 |
507 void ProxyService::SetProxyScriptFetcher( | 507 void ProxyService::SetProxyScriptFetcher( |
508 ProxyScriptFetcher* proxy_script_fetcher) { | 508 ProxyScriptFetcher* proxy_script_fetcher) { |
509 if (init_proxy_resolver_.get()) { | 509 if (init_proxy_resolver_.get()) { |
510 // We need to be careful to first cancel |init_proxy_resolver_|, since it | 510 // We need to be careful to first cancel |init_proxy_resolver_|, since it |
511 // holds a pointer to the old proxy script fetcher we are about to delete. | 511 // holds a pointer to the old proxy script fetcher we are about to delete. |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 OnCompletion(result_); | 817 OnCompletion(result_); |
818 } | 818 } |
819 } | 819 } |
820 | 820 |
821 void SyncProxyServiceHelper::OnCompletion(int rv) { | 821 void SyncProxyServiceHelper::OnCompletion(int rv) { |
822 result_ = rv; | 822 result_ = rv; |
823 event_.Signal(); | 823 event_.Signal(); |
824 } | 824 } |
825 | 825 |
826 } // namespace net | 826 } // namespace net |
OLD | NEW |