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

Side by Side Diff: proxy_resolver.h

Issue 5151005: AU: Proxy Resolver classes (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix whitespace 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__
7
8 #include <base/logging.h>
9
10 #include <string>
11 #include <vector>
12
13 namespace chromeos_update_engine {
14
15 extern const char kNoProxy[];
16
17 class ProxyResolver {
18 public:
19 ProxyResolver() {}
20 virtual ~ProxyResolver() {}
21
22 // Stores a proxy for a given |url| in |out_proxy|. Returns true on success.
petkov 2010/11/19 01:09:19 Stores a list of proxies for a given ...
adlr 2010/11/19 02:00:52 Done.
23 // The resultant proxy will be in one of the following forms:
24 // http://<host>[:<port>] - HTTP proxy
25 // socks{4,5}://<host>[:<port>] - SOCKS4/5 proxy
26 // kNoProxy - no proxy
27 virtual bool GetProxiesForUrl(const std::string& url,
28 std::vector<std::string>* out_proxies) = 0;
29
30 private:
31 DISALLOW_COPY_AND_ASSIGN(ProxyResolver);
32 };
33
34 // Always says to not use a proxy
35 class DirectProxyResolver : public ProxyResolver {
36 public:
37 virtual bool GetProxiesForUrl(const std::string& url,
38 std::vector<std::string>* out_proxies);
39
40 private:
41 DISALLOW_COPY_AND_ASSIGN(DirectProxyResolver);
42 };
43
44 } // namespace chromeos_update_engine
45
46 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PROXY_RESOLVER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698