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

Unified Diff: chrome_proxy_resolver.h

Issue 6516026: AU: Make proxy resolution asynchronous. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix utils.* include paths Created 9 years, 10 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
« no previous file with comments | « no previous file | chrome_proxy_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_proxy_resolver.h
diff --git a/chrome_proxy_resolver.h b/chrome_proxy_resolver.h
index 28d96cdc02a4986927958bae5be30731e38ae251..2df751e38f401c752695ea270466a01fe4505a1b 100644
--- a/chrome_proxy_resolver.h
+++ b/chrome_proxy_resolver.h
@@ -27,13 +27,20 @@ extern const char kSessionManagerProxySettingsKey[];
// Currently only supports manual settings, not PAC files or autodetected
// settings.
+struct ChromeProxyResolverClosureArgs {
+ std::string url;
+ ProxiesResolvedFn callback;
+ void* data;
+};
+
class ChromeProxyResolver : public ProxyResolver {
public:
explicit ChromeProxyResolver(DbusGlibInterface* dbus) : dbus_(dbus) {}
virtual ~ChromeProxyResolver() {}
virtual bool GetProxiesForUrl(const std::string& url,
- std::deque<std::string>* out_proxies);
+ ProxiesResolvedFn callback,
+ void* data);
// Get the curl proxy type for a given proxy url. Returns true on success.
// Note: if proxy is kNoProxy, this will return false.
@@ -42,6 +49,10 @@ class ChromeProxyResolver : public ProxyResolver {
private:
FRIEND_TEST(ChromeProxyResolverTest, GetProxiesForUrlWithSettingsTest);
+ // Closure callback, so we can pretend we need to wait on the main loop
+ // before returing proxies to the client.
+ void GetProxiesForUrlCallback(ChromeProxyResolverClosureArgs args);
+
// Fetches a dbus proxy to session manager. Returns NULL on failure.
DBusGProxy* DbusProxy();
« no previous file with comments | « no previous file | chrome_proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698