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

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

Issue 473513002: Keep track of network error in ProxyRetryInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by rsleevi - 2 Created 6 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_info.h" 5 #include "net/proxy/proxy_info.h"
6 6
7 #include "net/proxy/proxy_retry_info.h" 7 #include "net/proxy/proxy_retry_info.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void ProxyInfo::UseProxyList(const ProxyList& proxy_list) { 57 void ProxyInfo::UseProxyList(const ProxyList& proxy_list) {
58 Reset(); 58 Reset();
59 proxy_list_ = proxy_list; 59 proxy_list_ = proxy_list;
60 } 60 }
61 61
62 std::string ProxyInfo::ToPacString() const { 62 std::string ProxyInfo::ToPacString() const {
63 return proxy_list_.ToPacString(); 63 return proxy_list_.ToPacString();
64 } 64 }
65 65
66 bool ProxyInfo::Fallback(const BoundNetLog& net_log) { 66 bool ProxyInfo::Fallback(int net_error, const BoundNetLog& net_log) {
67 return proxy_list_.Fallback(&proxy_retry_info_, net_log); 67 return proxy_list_.Fallback(&proxy_retry_info_, net_error, net_log);
68 } 68 }
69 69
70 void ProxyInfo::DeprioritizeBadProxies( 70 void ProxyInfo::DeprioritizeBadProxies(
71 const ProxyRetryInfoMap& proxy_retry_info) { 71 const ProxyRetryInfoMap& proxy_retry_info) {
72 proxy_list_.DeprioritizeBadProxies(proxy_retry_info); 72 proxy_list_.DeprioritizeBadProxies(proxy_retry_info);
73 } 73 }
74 74
75 void ProxyInfo::RemoveProxiesWithoutScheme(int scheme_bit_field) { 75 void ProxyInfo::RemoveProxiesWithoutScheme(int scheme_bit_field) {
76 proxy_list_.RemoveProxiesWithoutScheme(scheme_bit_field); 76 proxy_list_.RemoveProxiesWithoutScheme(scheme_bit_field);
77 } 77 }
78 78
79 void ProxyInfo::Reset() { 79 void ProxyInfo::Reset() {
80 proxy_resolve_start_time_ = base::TimeTicks(); 80 proxy_resolve_start_time_ = base::TimeTicks();
81 proxy_resolve_end_time_ = base::TimeTicks(); 81 proxy_resolve_end_time_ = base::TimeTicks();
82 proxy_list_.Clear(); 82 proxy_list_.Clear();
83 proxy_retry_info_.clear(); 83 proxy_retry_info_.clear();
84 config_id_ = ProxyConfig::kInvalidConfigID; 84 config_id_ = ProxyConfig::kInvalidConfigID;
85 config_source_ = PROXY_CONFIG_SOURCE_UNKNOWN; 85 config_source_ = PROXY_CONFIG_SOURCE_UNKNOWN;
86 did_bypass_proxy_ = false; 86 did_bypass_proxy_ = false;
87 did_use_pac_script_ = false; 87 did_use_pac_script_ = false;
88 } 88 }
89 89
90 } // namespace net 90 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698