OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SERVER_H_ | 5 #ifndef NET_PROXY_PROXY_SERVER_H_ |
6 #define NET_PROXY_PROXY_SERVER_H_ | 6 #define NET_PROXY_PROXY_SERVER_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 host_port_pair_.Equals(other.host_port_pair_); | 147 host_port_pair_.Equals(other.host_port_pair_); |
148 } | 148 } |
149 | 149 |
150 // Comparator function so this can be placed in a std::map. | 150 // Comparator function so this can be placed in a std::map. |
151 bool operator<(const ProxyServer& other) const { | 151 bool operator<(const ProxyServer& other) const { |
152 if (scheme_ != other.scheme_) | 152 if (scheme_ != other.scheme_) |
153 return scheme_ < other.scheme_; | 153 return scheme_ < other.scheme_; |
154 return host_port_pair_ < other.host_port_pair_; | 154 return host_port_pair_ < other.host_port_pair_; |
155 } | 155 } |
156 | 156 |
157 #if defined(SPDY_PROXY_AUTH_ORIGIN) | |
158 // Returns true if this proxy server is the data reduction proxy or its | 157 // Returns true if this proxy server is the data reduction proxy or its |
159 // fallback, respectively, as configured in gyp. These functions will return | 158 // fallback, respectively, as configured in gyp. These functions will return |
160 // false for data reduction proxy servers specified on the command line. | 159 // false for data reduction proxy servers specified on the command line. |
161 bool isDataReductionProxy() const; | 160 bool isDataReductionProxy() const; |
bengr
2014/07/15 16:38:17
Add a TODO and file a bug to deprecate these. They
Not at Google. Contact bengr
2014/07/16 22:41:34
Removed these methods.
| |
162 bool isDataReductionProxyFallback() const; | 161 bool isDataReductionProxyFallback() const; |
163 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | |
164 | 162 |
165 private: | 163 private: |
166 // Creates a ProxyServer given a scheme, and host/port string. If parsing the | 164 // Creates a ProxyServer given a scheme, and host/port string. If parsing the |
167 // host/port string fails, the returned instance will be invalid. | 165 // host/port string fails, the returned instance will be invalid. |
168 static ProxyServer FromSchemeHostAndPort( | 166 static ProxyServer FromSchemeHostAndPort( |
169 Scheme scheme, | 167 Scheme scheme, |
170 std::string::const_iterator host_and_port_begin, | 168 std::string::const_iterator host_and_port_begin, |
171 std::string::const_iterator host_and_port_end); | 169 std::string::const_iterator host_and_port_end); |
172 | 170 |
173 Scheme scheme_; | 171 Scheme scheme_; |
174 HostPortPair host_port_pair_; | 172 HostPortPair host_port_pair_; |
175 }; | 173 }; |
176 | 174 |
177 typedef std::pair<HostPortPair, ProxyServer> HostPortProxyPair; | 175 typedef std::pair<HostPortPair, ProxyServer> HostPortProxyPair; |
178 | 176 |
179 } // namespace net | 177 } // namespace net |
180 | 178 |
181 #endif // NET_PROXY_PROXY_SERVER_H_ | 179 #endif // NET_PROXY_PROXY_SERVER_H_ |
OLD | NEW |