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

Unified Diff: chromeos/dbus/services/proxy_resolution_service_provider.h

Issue 2772573002: chromeos: Improve ProxyResolutionServiceProvider testing. (Closed)
Patch Set: add a DCHECK Created 3 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 side-by-side diff with in-line comments
Download patch
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;
};
// The interface is defined so we can mock out the proxy resolver

Powered by Google App Engine
This is Rietveld 408576698