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

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

Issue 8373014: Add new text for indicating we are resolving hosts during proxy resolution. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address eroman's nits. Created 9 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
« no previous file with comments | « net/proxy/multi_threaded_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver_mac.h » ('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) 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_PROXY_RESOLVER_H_ 5 #ifndef NET_PROXY_PROXY_RESOLVER_H_
6 #define NET_PROXY_PROXY_RESOLVER_H_ 6 #define NET_PROXY_PROXY_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
13 #include "net/base/completion_callback.h" 13 #include "net/base/completion_callback.h"
14 #include "net/base/load_states.h"
14 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
15 #include "net/proxy/proxy_resolver_script_data.h" 16 #include "net/proxy/proxy_resolver_script_data.h"
16 17
17 namespace net { 18 namespace net {
18 19
19 class BoundNetLog; 20 class BoundNetLog;
20 class ProxyInfo; 21 class ProxyInfo;
21 22
22 // Interface for "proxy resolvers". A ProxyResolver fills in a list of proxies 23 // Interface for "proxy resolvers". A ProxyResolver fills in a list of proxies
23 // to use for a particular URL. Generally the backend for a ProxyResolver is 24 // to use for a particular URL. Generally the backend for a ProxyResolver is
(...skipping 18 matching lines...) Expand all
42 // |*request| is written to, and can be passed to CancelRequest(). 43 // |*request| is written to, and can be passed to CancelRequest().
43 virtual int GetProxyForURL(const GURL& url, 44 virtual int GetProxyForURL(const GURL& url,
44 ProxyInfo* results, 45 ProxyInfo* results,
45 OldCompletionCallback* callback, 46 OldCompletionCallback* callback,
46 RequestHandle* request, 47 RequestHandle* request,
47 const BoundNetLog& net_log) = 0; 48 const BoundNetLog& net_log) = 0;
48 49
49 // Cancels |request|. 50 // Cancels |request|.
50 virtual void CancelRequest(RequestHandle request) = 0; 51 virtual void CancelRequest(RequestHandle request) = 0;
51 52
53 // Gets the LoadState for |request|.
54 virtual LoadState GetLoadState(RequestHandle request) const = 0;
55
56 // Gets the LoadState for |request|. May be called from another thread.
57 virtual LoadState GetLoadStateThreadSafe(RequestHandle request) const = 0;
58
52 // The PAC script backend can be specified to the ProxyResolver either via 59 // The PAC script backend can be specified to the ProxyResolver either via
53 // URL, or via the javascript text itself. If |expects_pac_bytes| is true, 60 // URL, or via the javascript text itself. If |expects_pac_bytes| is true,
54 // then the ProxyResolverScriptData passed to SetPacScript() should 61 // then the ProxyResolverScriptData passed to SetPacScript() should
55 // contain the actual script bytes rather than just the URL. 62 // contain the actual script bytes rather than just the URL.
56 bool expects_pac_bytes() const { return expects_pac_bytes_; } 63 bool expects_pac_bytes() const { return expects_pac_bytes_; }
57 64
58 virtual void CancelSetPacScript() = 0; 65 virtual void CancelSetPacScript() = 0;
59 66
60 // Frees any unneeded memory held by the resolver, e.g. garbage in the JS 67 // Frees any unneeded memory held by the resolver, e.g. garbage in the JS
61 // engine. Most subclasses don't need to do anything, so we provide a default 68 // engine. Most subclasses don't need to do anything, so we provide a default
(...skipping 13 matching lines...) Expand all
75 82
76 private: 83 private:
77 const bool expects_pac_bytes_; 84 const bool expects_pac_bytes_;
78 85
79 DISALLOW_COPY_AND_ASSIGN(ProxyResolver); 86 DISALLOW_COPY_AND_ASSIGN(ProxyResolver);
80 }; 87 };
81 88
82 } // namespace net 89 } // namespace net
83 90
84 #endif // NET_PROXY_PROXY_RESOLVER_H_ 91 #endif // NET_PROXY_PROXY_RESOLVER_H_
OLDNEW
« no previous file with comments | « net/proxy/multi_threaded_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698