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

Unified Diff: chrome_browser_proxy_resolver.cc

Issue 6681042: AU: Handle inability to get proxy servers from Chrome better. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix warning Created 9 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
« no previous file with comments | « no previous file | chrome_browser_proxy_resolver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_browser_proxy_resolver.cc
diff --git a/chrome_browser_proxy_resolver.cc b/chrome_browser_proxy_resolver.cc
index a481f4fbb0d1d9ef68109ab0333320d62d8db126..abfec16539799472a0c8f8be087177123d3cc9ec 100644
--- a/chrome_browser_proxy_resolver.cc
+++ b/chrome_browser_proxy_resolver.cc
@@ -128,8 +128,8 @@ bool ChromeBrowserProxyResolver::GetProxiesForUrl(const string& url,
ProxiesResolvedFn callback,
void* data) {
GError* error = NULL;
- TEST_AND_RETURN_FALSE(proxy_);
- if (!dbus_->ProxyCall(
+ guint timeout = timeout_;
+ if (!proxy_ || !dbus_->ProxyCall(
proxy_,
kLibCrosServiceResolveNetworkProxyMethodName,
&error,
@@ -137,15 +137,16 @@ bool ChromeBrowserProxyResolver::GetProxiesForUrl(const string& url,
G_TYPE_STRING, kLibCrosProxyResolveSignalInterface,
G_TYPE_STRING, kLibCrosProxyResolveName,
G_TYPE_INVALID, G_TYPE_INVALID)) {
- LOG(ERROR) << "dbus_g_proxy_call failed: "
- << utils::GetGErrorMessage(error);
- return false;
+ LOG(WARNING) << "dbus_g_proxy_call failed: "
+ << utils::GetGErrorMessage(error)
+ << " Continuing with no proxy.";
+ timeout = 0;
}
callbacks_.insert(make_pair(url, make_pair(callback, data)));
Closure* closure = NewCallback(this,
&ChromeBrowserProxyResolver::HandleTimeout,
url);
- GSource* timer = g_timeout_source_new_seconds(timeout_);
+ GSource* timer = g_timeout_source_new_seconds(timeout);
g_source_set_callback(timer, &utils::GlibRunClosure, closure, NULL);
g_source_attach(timer, NULL);
timers_.insert(make_pair(url, timer));
« no previous file with comments | « no previous file | chrome_browser_proxy_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698