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

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

Issue 1286373002: Refactored not to expose raw pointers on ProxyList class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « AUTHORS ('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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // "DIRECT" 71 // "DIRECT"
72 // "PROXY foopy1" 72 // "PROXY foopy1"
73 // "PROXY foopy1; SOCKS4 foopy2:1188" 73 // "PROXY foopy1; SOCKS4 foopy2:1188"
74 // Does a best-effort parse, and silently discards any errors. 74 // Does a best-effort parse, and silently discards any errors.
75 void SetFromPacString(const std::string& pac_string); 75 void SetFromPacString(const std::string& pac_string);
76 76
77 // Returns a PAC-style semicolon-separated list of valid proxy servers. 77 // Returns a PAC-style semicolon-separated list of valid proxy servers.
78 // 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".
79 std::string ToPacString() const; 79 std::string ToPacString() const;
80 80
81 // Returns a serialized value for the list. The caller takes ownership of it. 81 // Returns a serialized value for the list.
82 base::ListValue* ToValue() const; 82 scoped_ptr<base::ListValue> ToValue() const;
83 83
84 // Marks the current proxy server as bad and deletes it from the list. The 84 // Marks the current proxy server as bad and deletes it from the list. The
85 // list of known bad proxies is given by |proxy_retry_info|. |net_error| 85 // list of known bad proxies is given by |proxy_retry_info|. |net_error|
86 // should contain the network error encountered when this proxy was tried, if 86 // should contain the network error encountered when this proxy was tried, if
87 // any. If this fallback is not because of a network error, then |OK| should 87 // any. If this fallback is not because of a network error, then |OK| should
88 // be passed in (eg. for reasons such as local policy). Returns true if there 88 // be passed in (eg. for reasons such as local policy). Returns true if there
89 // is another server available in the list. 89 // is another server available in the list.
90 bool Fallback(ProxyRetryInfoMap* proxy_retry_info, 90 bool Fallback(ProxyRetryInfoMap* proxy_retry_info,
91 int net_error, 91 int net_error,
92 const BoundNetLog& net_log); 92 const BoundNetLog& net_log);
(...skipping 28 matching lines...) Expand all
121 int net_error, 121 int net_error,
122 const BoundNetLog& net_log) const; 122 const BoundNetLog& net_log) const;
123 123
124 // List of proxies. 124 // List of proxies.
125 std::vector<ProxyServer> proxies_; 125 std::vector<ProxyServer> proxies_;
126 }; 126 };
127 127
128 } // namespace net 128 } // namespace net
129 129
130 #endif // NET_PROXY_PROXY_LIST_H_ 130 #endif // NET_PROXY_PROXY_LIST_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | net/proxy/proxy_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698