Chromium Code Reviews| Index: chromeos/dbus/services/proxy_resolution_service_provider.h |
| diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.h b/chromeos/dbus/services/proxy_resolution_service_provider.h |
| index 742db347c268b080ce02adb41d882bc2f9ece037..c6101a5d98cc96fed704a5b90ec4ec0d05228265 100644 |
| --- a/chromeos/dbus/services/proxy_resolution_service_provider.h |
| +++ b/chromeos/dbus/services/proxy_resolution_service_provider.h |
| @@ -14,6 +14,9 @@ |
| #include "chromeos/chromeos_export.h" |
| #include "chromeos/dbus/services/cros_dbus_service.h" |
| #include "dbus/exported_object.h" |
| +#include "net/base/completion_callback.h" |
| + |
| +class GURL; |
| namespace base { |
| class SingleThreadTaskRunner; |
| @@ -24,6 +27,8 @@ class MethodCall; |
| } |
| namespace net { |
| +class ProxyInfo; |
| +class ProxyService; |
| class URLRequestContextGetter; |
| } |
| @@ -134,6 +139,13 @@ class CHROMEOS_EXPORT ProxyResolverDelegate { |
| // Returns the request context used to perform proxy resolution. |
| // Always called on UI thread. |
| virtual scoped_refptr<net::URLRequestContextGetter> GetRequestContext() = 0; |
| + |
| + // Thin wrapper around net::ProxyService::ResolveProxy() to make testing |
| + // easier. |
| + virtual int ResolveProxy(net::ProxyService* proxy_service, |
| + const GURL& url, |
| + net::ProxyInfo* results, |
| + const net::CompletionCallback& callback) = 0; |
|
James Cook
2017/03/22 23:16:27
Could this provide a default implementation so it
Daniel Erat
2017/03/22 23:23:40
hmm. this interface needs to be implemented by chr
|
| }; |
| // The interface is defined so we can mock out the proxy resolver |