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

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

Issue 1747013002: Revert of Change ProxyResolver::GetProxyForURL() to take a scoped_ptr<Request>* rather than a Reque… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « net/proxy/proxy_resolver_perftest.cc ('k') | net/proxy/proxy_resolver_v8_tracing.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_V8_TRACING_H_ 5 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
6 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ 6 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 private: 44 private:
45 DISALLOW_COPY_AND_ASSIGN(Bindings); 45 DISALLOW_COPY_AND_ASSIGN(Bindings);
46 }; 46 };
47 47
48 virtual ~ProxyResolverV8Tracing() {} 48 virtual ~ProxyResolverV8Tracing() {}
49 49
50 // Gets a list of proxy servers to use for |url|. This request always 50 // Gets a list of proxy servers to use for |url|. This request always
51 // runs asynchronously and notifies the result by running |callback|. If the 51 // runs asynchronously and notifies the result by running |callback|. If the
52 // result code is OK then the request was successful and |results| contains 52 // result code is OK then the request was successful and |results| contains
53 // the proxy resolution information. Request can be cancelled by resetting 53 // the proxy resolution information. If |request| is non-null, |*request| is
54 // |*request|. 54 // written to, and can be passed to CancelRequest().
55 virtual void GetProxyForURL(const GURL& url, 55 virtual void GetProxyForURL(const GURL& url,
56 ProxyInfo* results, 56 ProxyInfo* results,
57 const CompletionCallback& callback, 57 const CompletionCallback& callback,
58 scoped_ptr<ProxyResolver::Request>* request, 58 ProxyResolver::RequestHandle* request,
59 scoped_ptr<Bindings> bindings) = 0; 59 scoped_ptr<Bindings> bindings) = 0;
60
61 // Cancels |request|.
62 virtual void CancelRequest(ProxyResolver::RequestHandle request) = 0;
63
64 // Gets the LoadState for |request|.
65 virtual LoadState GetLoadState(
66 ProxyResolver::RequestHandle request) const = 0;
60 }; 67 };
61 68
62 // A factory for ProxyResolverV8Tracing instances. The default implementation, 69 // A factory for ProxyResolverV8Tracing instances. The default implementation,
63 // returned by Create(), creates ProxyResolverV8Tracing instances that execute 70 // returned by Create(), creates ProxyResolverV8Tracing instances that execute
64 // ProxyResolverV8 on a single helper thread, and do some magic to avoid 71 // ProxyResolverV8 on a single helper thread, and do some magic to avoid
65 // blocking in DNS. For more details see the design document: 72 // blocking in DNS. For more details see the design document:
66 // https://docs.google.com/a/google.com/document/d/16Ij5OcVnR3s0MH4Z5XkhI9VTPoMJ daBn9rKreAmGOdE/edit?pli=1 73 // https://docs.google.com/a/google.com/document/d/16Ij5OcVnR3s0MH4Z5XkhI9VTPoMJ daBn9rKreAmGOdE/edit?pli=1
67 class NET_EXPORT ProxyResolverV8TracingFactory { 74 class NET_EXPORT ProxyResolverV8TracingFactory {
68 public: 75 public:
69 ProxyResolverV8TracingFactory() {} 76 ProxyResolverV8TracingFactory() {}
70 virtual ~ProxyResolverV8TracingFactory() = default; 77 virtual ~ProxyResolverV8TracingFactory() = default;
71 78
72 virtual void CreateProxyResolverV8Tracing( 79 virtual void CreateProxyResolverV8Tracing(
73 const scoped_refptr<ProxyResolverScriptData>& pac_script, 80 const scoped_refptr<ProxyResolverScriptData>& pac_script,
74 scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings, 81 scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
75 scoped_ptr<ProxyResolverV8Tracing>* resolver, 82 scoped_ptr<ProxyResolverV8Tracing>* resolver,
76 const CompletionCallback& callback, 83 const CompletionCallback& callback,
77 scoped_ptr<ProxyResolverFactory::Request>* request) = 0; 84 scoped_ptr<ProxyResolverFactory::Request>* request) = 0;
78 85
79 static scoped_ptr<ProxyResolverV8TracingFactory> Create(); 86 static scoped_ptr<ProxyResolverV8TracingFactory> Create();
80 87
81 private: 88 private:
82 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactory); 89 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactory);
83 }; 90 };
84 91
85 } // namespace net 92 } // namespace net
86 93
87 #endif // NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ 94 #endif // NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_perftest.cc ('k') | net/proxy/proxy_resolver_v8_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698