| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| 11 #if defined(OS_MACOSX) | 11 #if defined(OS_MACOSX) |
| 12 #include <CoreFoundation/CoreFoundation.h> | 12 #include <CoreFoundation/CoreFoundation.h> |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include <string> | 15 #include <string> |
| 16 #include "net/base/host_port_pair.h" | 16 #include "net/base/host_port_pair.h" |
| 17 #include "net/base/net_api.h" | 17 #include "net/base/net_export.h" |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 // ProxyServer encodes the {type, host, port} of a proxy server. | 21 // ProxyServer encodes the {type, host, port} of a proxy server. |
| 22 // ProxyServer is immutable. | 22 // ProxyServer is immutable. |
| 23 class NET_API ProxyServer { | 23 class NET_EXPORT ProxyServer { |
| 24 public: | 24 public: |
| 25 // The type of proxy. These are defined as bit flags so they can be ORed | 25 // The type of proxy. These are defined as bit flags so they can be ORed |
| 26 // together to pass as the |scheme_bit_field| argument to | 26 // together to pass as the |scheme_bit_field| argument to |
| 27 // ProxyService::RemoveProxiesWithoutScheme(). | 27 // ProxyService::RemoveProxiesWithoutScheme(). |
| 28 enum Scheme { | 28 enum Scheme { |
| 29 SCHEME_INVALID = 1 << 0, | 29 SCHEME_INVALID = 1 << 0, |
| 30 SCHEME_DIRECT = 1 << 1, | 30 SCHEME_DIRECT = 1 << 1, |
| 31 SCHEME_HTTP = 1 << 2, | 31 SCHEME_HTTP = 1 << 2, |
| 32 SCHEME_SOCKS4 = 1 << 3, | 32 SCHEME_SOCKS4 = 1 << 3, |
| 33 SCHEME_SOCKS5 = 1 << 4, | 33 SCHEME_SOCKS5 = 1 << 4, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 Scheme scheme_; | 158 Scheme scheme_; |
| 159 HostPortPair host_port_pair_; | 159 HostPortPair host_port_pair_; |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 typedef std::pair<HostPortPair, ProxyServer> HostPortProxyPair; | 162 typedef std::pair<HostPortPair, ProxyServer> HostPortProxyPair; |
| 163 | 163 |
| 164 } // namespace net | 164 } // namespace net |
| 165 | 165 |
| 166 #endif // NET_PROXY_PROXY_SERVER_H_ | 166 #endif // NET_PROXY_PROXY_SERVER_H_ |
| OLD | NEW |