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

Side by Side Diff: proxy_resolver.h

Issue 5205002: AU: Manual proxy support (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: missed one fix for review Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « omaha_request_action_unittest.cc ('k') | proxy_resolver.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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__
7 7
8 #include <base/logging.h> 8 #include <base/logging.h>
9 9
10 #include <deque>
10 #include <string> 11 #include <string>
11 #include <vector>
12 12
13 namespace chromeos_update_engine { 13 namespace chromeos_update_engine {
14 14
15 extern const char kNoProxy[]; 15 extern const char kNoProxy[];
16 16
17 class ProxyResolver { 17 class ProxyResolver {
18 public: 18 public:
19 ProxyResolver() {} 19 ProxyResolver() {}
20 virtual ~ProxyResolver() {} 20 virtual ~ProxyResolver() {}
21 21
22 // Stores a list of proxies for a given |url| in |out_proxy|. 22 // Stores a list of proxies for a given |url| in |out_proxy|.
23 // Returns true on success. The resultant proxy will be in one of the 23 // Returns true on success. The resultant proxy will be in one of the
24 // following forms: 24 // following forms:
25 // http://<host>[:<port>] - HTTP proxy 25 // http://<host>[:<port>] - HTTP proxy
26 // socks{4,5}://<host>[:<port>] - SOCKS4/5 proxy 26 // socks{4,5}://<host>[:<port>] - SOCKS4/5 proxy
27 // kNoProxy - no proxy 27 // kNoProxy - no proxy
28 virtual bool GetProxiesForUrl(const std::string& url, 28 virtual bool GetProxiesForUrl(const std::string& url,
29 std::vector<std::string>* out_proxies) = 0; 29 std::deque<std::string>* out_proxies) = 0;
30 30
31 private: 31 private:
32 DISALLOW_COPY_AND_ASSIGN(ProxyResolver); 32 DISALLOW_COPY_AND_ASSIGN(ProxyResolver);
33 }; 33 };
34 34
35 // Always says to not use a proxy 35 // Always says to not use a proxy
36 class DirectProxyResolver : public ProxyResolver { 36 class DirectProxyResolver : public ProxyResolver {
37 public: 37 public:
38 DirectProxyResolver() {}
38 virtual bool GetProxiesForUrl(const std::string& url, 39 virtual bool GetProxiesForUrl(const std::string& url,
39 std::vector<std::string>* out_proxies); 40 std::deque<std::string>* out_proxies);
40 41
41 private: 42 private:
42 DISALLOW_COPY_AND_ASSIGN(DirectProxyResolver); 43 DISALLOW_COPY_AND_ASSIGN(DirectProxyResolver);
43 }; 44 };
44 45
45 } // namespace chromeos_update_engine 46 } // namespace chromeos_update_engine
46 47
47 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__ 48 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__
OLDNEW
« no previous file with comments | « omaha_request_action_unittest.cc ('k') | proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698