| OLD | NEW |
| 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 #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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return proxy_server().is_https(); | 68 return proxy_server().is_https(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Returns true if the first valid proxy server is an http proxy. | 71 // Returns true if the first valid proxy server is an http proxy. |
| 72 bool is_http() const { | 72 bool is_http() const { |
| 73 if (is_empty()) | 73 if (is_empty()) |
| 74 return false; | 74 return false; |
| 75 return proxy_server().is_http(); | 75 return proxy_server().is_http(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Returns true if the first valid proxy server is a quic proxy. |
| 79 bool is_quic() const { |
| 80 if (is_empty()) |
| 81 return false; |
| 82 return proxy_server().is_quic(); |
| 83 } |
| 84 |
| 78 // Returns true if the first valid proxy server is a socks server. | 85 // Returns true if the first valid proxy server is a socks server. |
| 79 bool is_socks() const { | 86 bool is_socks() const { |
| 80 if (is_empty()) | 87 if (is_empty()) |
| 81 return false; | 88 return false; |
| 82 return proxy_server().is_socks(); | 89 return proxy_server().is_socks(); |
| 83 } | 90 } |
| 84 | 91 |
| 85 // Returns true if this proxy info has no proxies left to try. | 92 // Returns true if this proxy info has no proxies left to try. |
| 86 bool is_empty() const { | 93 bool is_empty() const { |
| 87 return proxy_list_.IsEmpty(); | 94 return proxy_list_.IsEmpty(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 167 |
| 161 // How long it took to resolve the proxy. Times are both null if proxy was | 168 // How long it took to resolve the proxy. Times are both null if proxy was |
| 162 // determined synchronously without running a PAC. | 169 // determined synchronously without running a PAC. |
| 163 base::TimeTicks proxy_resolve_start_time_; | 170 base::TimeTicks proxy_resolve_start_time_; |
| 164 base::TimeTicks proxy_resolve_end_time_; | 171 base::TimeTicks proxy_resolve_end_time_; |
| 165 }; | 172 }; |
| 166 | 173 |
| 167 } // namespace net | 174 } // namespace net |
| 168 | 175 |
| 169 #endif // NET_PROXY_PROXY_INFO_H_ | 176 #endif // NET_PROXY_PROXY_INFO_H_ |
| OLD | NEW |