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

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

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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_INIT_PROXY_RESOLVER_H_ 5 #ifndef NET_PROXY_INIT_PROXY_RESOLVER_H_
6 #define NET_PROXY_INIT_PROXY_RESOLVER_H_ 6 #define NET_PROXY_INIT_PROXY_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "net/base/net_api.h" 17 #include "net/base/net_export.h"
18 #include "net/base/net_log.h" 18 #include "net/base/net_log.h"
19 19
20 namespace net { 20 namespace net {
21 21
22 class DhcpProxyScriptFetcher; 22 class DhcpProxyScriptFetcher;
23 class NetLogParameter; 23 class NetLogParameter;
24 class ProxyConfig; 24 class ProxyConfig;
25 class ProxyResolver; 25 class ProxyResolver;
26 class ProxyScriptFetcher; 26 class ProxyScriptFetcher;
27 class URLRequestContext; 27 class URLRequestContext;
28 28
29 // InitProxyResolver is a helper class used by ProxyService to 29 // InitProxyResolver is a helper class used by ProxyService to
30 // initialize a ProxyResolver with the PAC script data specified 30 // initialize a ProxyResolver with the PAC script data specified
31 // by a particular ProxyConfig. 31 // by a particular ProxyConfig.
32 // 32 //
33 // This involves trying to use PAC scripts in this order: 33 // This involves trying to use PAC scripts in this order:
34 // 34 //
35 // (1) WPAD (DNS) if auto-detect is on. 35 // (1) WPAD (DNS) if auto-detect is on.
36 // (2) Custom PAC script if a URL was given. 36 // (2) Custom PAC script if a URL was given.
37 // 37 //
38 // If no PAC script was successfully downloaded + parsed, then it fails with 38 // If no PAC script was successfully downloaded + parsed, then it fails with
39 // a network error. Otherwise the proxy resolver is left initialized with 39 // a network error. Otherwise the proxy resolver is left initialized with
40 // the PAC script. 40 // the PAC script.
41 // 41 //
42 // Deleting InitProxyResolver while Init() is in progress, will 42 // Deleting InitProxyResolver while Init() is in progress, will
43 // cancel the request. 43 // cancel the request.
44 // 44 //
45 class NET_TEST InitProxyResolver { 45 class NET_EXPORT_PRIVATE InitProxyResolver {
46 public: 46 public:
47 // |resolver|, |proxy_script_fetcher|, |dhcp_proxy_script_fetcher| and 47 // |resolver|, |proxy_script_fetcher|, |dhcp_proxy_script_fetcher| and
48 // |net_log| must remain valid for the lifespan of InitProxyResolver. 48 // |net_log| must remain valid for the lifespan of InitProxyResolver.
49 InitProxyResolver(ProxyResolver* resolver, 49 InitProxyResolver(ProxyResolver* resolver,
50 ProxyScriptFetcher* proxy_script_fetcher, 50 ProxyScriptFetcher* proxy_script_fetcher,
51 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, 51 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
52 NetLog* net_log); 52 NetLog* net_log);
53 53
54 // Aborts any in-progress request. 54 // Aborts any in-progress request.
55 ~InitProxyResolver(); 55 ~InitProxyResolver();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::OneShotTimer<InitProxyResolver> wait_timer_; 158 base::OneShotTimer<InitProxyResolver> wait_timer_;
159 159
160 ProxyConfig* effective_config_; 160 ProxyConfig* effective_config_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(InitProxyResolver); 162 DISALLOW_COPY_AND_ASSIGN(InitProxyResolver);
163 }; 163 };
164 164
165 } // namespace net 165 } // namespace net
166 166
167 #endif // NET_PROXY_INIT_PROXY_RESOLVER_H_ 167 #endif // NET_PROXY_INIT_PROXY_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698