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

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

Issue 3192011: Make sure the key into the spdy session pool identifies the actual proxy used... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rework some comments Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef NET_PROXY_PROXY_INFO_H_ 5 #ifndef NET_PROXY_PROXY_INFO_H_
6 #define NET_PROXY_PROXY_INFO_H_ 6 #define NET_PROXY_PROXY_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return proxy_server().is_socks(); 70 return proxy_server().is_socks();
71 } 71 }
72 72
73 // Returns true if this proxy info has no proxies left to try. 73 // Returns true if this proxy info has no proxies left to try.
74 bool is_empty() const { 74 bool is_empty() const {
75 return proxy_list_.IsEmpty(); 75 return proxy_list_.IsEmpty();
76 } 76 }
77 77
78 // Returns the first valid proxy server. is_empty() must be false to be able 78 // Returns the first valid proxy server. is_empty() must be false to be able
79 // to call this function. 79 // to call this function.
80 ProxyServer proxy_server() const { return proxy_list_.Get(); } 80 const ProxyServer& proxy_server() const { return proxy_list_.Get(); }
81 81
82 // See description in ProxyList::ToPacString(). 82 // See description in ProxyList::ToPacString().
83 std::string ToPacString() const; 83 std::string ToPacString() const;
84 84
85 // Marks the current proxy as bad. Returns true if there is another proxy 85 // Marks the current proxy as bad. Returns true if there is another proxy
86 // available to try in proxy list_. 86 // available to try in proxy list_.
87 bool Fallback(ProxyRetryInfoMap* proxy_retry_info) { 87 bool Fallback(ProxyRetryInfoMap* proxy_retry_info) {
88 return proxy_list_.Fallback(proxy_retry_info); 88 return proxy_list_.Fallback(proxy_retry_info);
89 } 89 }
90 90
(...skipping 15 matching lines...) Expand all
106 // try. If proxy_list_ is empty, then there is nothing left to fall back to. 106 // try. If proxy_list_ is empty, then there is nothing left to fall back to.
107 ProxyList proxy_list_; 107 ProxyList proxy_list_;
108 108
109 // This value identifies the proxy config used to initialize this object. 109 // This value identifies the proxy config used to initialize this object.
110 ProxyConfig::ID config_id_; 110 ProxyConfig::ID config_id_;
111 }; 111 };
112 112
113 } // namespace net 113 } // namespace net
114 114
115 #endif // NET_PROXY_PROXY_INFO_H_ 115 #endif // NET_PROXY_PROXY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698