diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-01 23:31:11 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-01 23:31:11 +0000 |
commit | a1df9c4bf669ea4aea4193fda0255f6a04174b67 (patch) | |
tree | c0cb70bb6b080c38aad3359b28c3dd53d37d2d71 | |
parent | 0eee054a1cb5ed5a1917ca457cca4b127290edb6 (diff) | |
download | chromium_src-a1df9c4bf669ea4aea4193fda0255f6a04174b67.zip chromium_src-a1df9c4bf669ea4aea4193fda0255f6a04174b67.tar.gz chromium_src-a1df9c4bf669ea4aea4193fda0255f6a04174b67.tar.bz2 |
Removed non-working proxy auto-detect code.
Removed now-unused SignalThreadTask class.
BUG=none
TEST=unittests
Review URL: http://codereview.chromium.org/2436004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48676 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/net/notifier/communicator/xmpp_connection_generator.cc | 38 | ||||
-rw-r--r-- | chrome/common/net/notifier/communicator/xmpp_connection_generator.h | 2 |
2 files changed, 2 insertions, 38 deletions
diff --git a/chrome/common/net/notifier/communicator/xmpp_connection_generator.cc b/chrome/common/net/notifier/communicator/xmpp_connection_generator.cc index 1c157f8..b9b1272 100644 --- a/chrome/common/net/notifier/communicator/xmpp_connection_generator.cc +++ b/chrome/common/net/notifier/communicator/xmpp_connection_generator.cc @@ -29,7 +29,6 @@ #include "chrome/common/net/notifier/communicator/product_info.h" #include "net/base/net_errors.h" #include "net/base/sys_addrinfo.h" -#include "talk/base/autodetectproxy.h" #include "talk/base/httpcommon-inl.h" #include "talk/base/task.h" #include "talk/base/thread.h" @@ -88,47 +87,14 @@ const talk_base::ProxyInfo& XmppConnectionGenerator::proxy() const { void XmppConnectionGenerator::StartGenerating() { LOG(INFO) << "XmppConnectionGenerator::StartGenerating"; - talk_base::AutoDetectProxy* proxy_detect = - new talk_base::AutoDetectProxy(GetUserAgentString()); - - if (options_->autodetect_proxy()) { - // Pretend the xmpp server is https, when detecting whether a proxy is - // required to connect. - talk_base::Url<char> host_url("/", - server_list_[0].server.host.c_str(), - server_list_[0].server.port); - host_url.set_secure(true); - proxy_detect->set_server_url(host_url.url()); - } else if (options_->proxy_host().length()) { - talk_base::SocketAddress proxy(options_->proxy_host(), - options_->proxy_port()); - proxy_detect->set_proxy(proxy); - } - proxy_detect->set_auth_info(options_->use_proxy_auth(), - options_->auth_user(), - talk_base::CryptString(options_->auth_pass())); - - SignalThreadTask<talk_base::AutoDetectProxy>* wrapper_task = - new SignalThreadTask<talk_base::AutoDetectProxy>(parent_, &proxy_detect); - wrapper_task->SignalWorkDone.connect( - this, - &XmppConnectionGenerator::OnProxyDetect); - wrapper_task->Start(); -} - -void XmppConnectionGenerator::OnProxyDetect( - talk_base::AutoDetectProxy* proxy_detect) { - LOG(INFO) << "XmppConnectionGenerator::OnProxyDetect"; - - DCHECK(settings_list_.get()); - DCHECK(proxy_detect); - settings_list_->SetProxy(proxy_detect->proxy()); + // TODO(akalin): Detect proxy settings once we use Chrome sockets. // Start iterating through the connections (which are generated on demand). UseNextConnection(); } void XmppConnectionGenerator::UseNextConnection() { + DCHECK(settings_list_.get()); // Loop until we can use a connection or we run out of connections // to try. while (true) { diff --git a/chrome/common/net/notifier/communicator/xmpp_connection_generator.h b/chrome/common/net/notifier/communicator/xmpp_connection_generator.h index 114ac4b..1f9dfaa 100644 --- a/chrome/common/net/notifier/communicator/xmpp_connection_generator.h +++ b/chrome/common/net/notifier/communicator/xmpp_connection_generator.h @@ -17,7 +17,6 @@ #include "talk/base/sigslot.h" namespace talk_base { -class AutoDetectProxy; struct ProxyInfo; class SignalThread; class Task; @@ -68,7 +67,6 @@ class XmppConnectionGenerator : public sigslot::has_slots<> { sigslot::signal2<bool, int> SignalExhaustedSettings; private: - void OnProxyDetect(talk_base::AutoDetectProxy* proxy_detect); void OnServerDNSResolved(int status); void HandleServerDNSResolved(int status); void HandleExhaustedConnections(); |