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

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

Issue 896203003: Implement utility-side proxy resolver Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-diffbase
Patch Set: fix windows compile Created 5 years, 10 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
« no previous file with comments | « net/proxy/mojo_type_converters.cc ('k') | net/proxy/proxy_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_PROXY_PROXY_LIST_H_ 5 #ifndef NET_PROXY_PROXY_LIST_H_
6 #define NET_PROXY_PROXY_LIST_H_ 6 #define NET_PROXY_PROXY_LIST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Returns the number of proxy servers in this list. 56 // Returns the number of proxy servers in this list.
57 size_t size() const; 57 size_t size() const;
58 58
59 // Returns true if |*this| lists the same proxies as |other|. 59 // Returns true if |*this| lists the same proxies as |other|.
60 bool Equals(const ProxyList& other) const; 60 bool Equals(const ProxyList& other) const;
61 61
62 // Returns the first proxy server in the list. It is only valid to call 62 // Returns the first proxy server in the list. It is only valid to call
63 // this if !IsEmpty(). 63 // this if !IsEmpty().
64 const ProxyServer& Get() const; 64 const ProxyServer& Get() const;
65 65
66 // Returns all proxy servers in the list.
67 const std::vector<ProxyServer>& GetAll() const;
68
66 // Sets the list by parsing the pac result |pac_string|. 69 // Sets the list by parsing the pac result |pac_string|.
67 // Some examples for |pac_string|: 70 // Some examples for |pac_string|:
68 // "DIRECT" 71 // "DIRECT"
69 // "PROXY foopy1" 72 // "PROXY foopy1"
70 // "PROXY foopy1; SOCKS4 foopy2:1188" 73 // "PROXY foopy1; SOCKS4 foopy2:1188"
71 // Does a best-effort parse, and silently discards any errors. 74 // Does a best-effort parse, and silently discards any errors.
72 void SetFromPacString(const std::string& pac_string); 75 void SetFromPacString(const std::string& pac_string);
73 76
74 // Returns a PAC-style semicolon-separated list of valid proxy servers. 77 // Returns a PAC-style semicolon-separated list of valid proxy servers.
75 // For example: "PROXY xxx.xxx.xxx.xxx:xx; SOCKS yyy.yyy.yyy:yy". 78 // For example: "PROXY xxx.xxx.xxx.xxx:xx; SOCKS yyy.yyy.yyy:yy".
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 int net_error, 121 int net_error,
119 const BoundNetLog& net_log) const; 122 const BoundNetLog& net_log) const;
120 123
121 // List of proxies. 124 // List of proxies.
122 std::vector<ProxyServer> proxies_; 125 std::vector<ProxyServer> proxies_;
123 }; 126 };
124 127
125 } // namespace net 128 } // namespace net
126 129
127 #endif // NET_PROXY_PROXY_LIST_H_ 130 #endif // NET_PROXY_PROXY_LIST_H_
OLDNEW
« no previous file with comments | « net/proxy/mojo_type_converters.cc ('k') | net/proxy/proxy_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698