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

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

Issue 542029: Retry proxies which were cached as bad before giving up.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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_list_unittest.cc ('k') | net/proxy/proxy_service_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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « net/proxy/proxy_list_unittest.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698