diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 22:24:23 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 22:24:23 +0000 |
commit | cc3d6f596df5fa5fa6258b69e947c8977ade7dc7 (patch) | |
tree | 45fb6e52c4bf49129dbc62e50c3e1b06418839cd /jingle/notifier/communicator/single_login_attempt.cc | |
parent | a21f65f36474d39b95b3b16aad15f6c7abbc8fb6 (diff) | |
download | chromium_src-cc3d6f596df5fa5fa6258b69e947c8977ade7dc7.zip chromium_src-cc3d6f596df5fa5fa6258b69e947c8977ade7dc7.tar.gz chromium_src-cc3d6f596df5fa5fa6258b69e947c8977ade7dc7.tar.bz2 |
[Sync] Removed use of libjingle's sigslot in XmppConnectionGenerator
This is a speculative fix for the crash in the bug.
BUG=58042
TEST=sync integration tests
Review URL: http://codereview.chromium.org/4155004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63959 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/notifier/communicator/single_login_attempt.cc')
-rw-r--r-- | jingle/notifier/communicator/single_login_attempt.cc | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/jingle/notifier/communicator/single_login_attempt.cc b/jingle/notifier/communicator/single_login_attempt.cc index 4c361bd..2d2fbe0 100644 --- a/jingle/notifier/communicator/single_login_attempt.cc +++ b/jingle/notifier/communicator/single_login_attempt.cc @@ -9,6 +9,7 @@ #include "jingle/notifier/communicator/single_login_attempt.h" +#include "base/compiler_specific.h" #include "base/logging.h" #include "jingle/notifier/communicator/connection_options.h" #include "jingle/notifier/communicator/connection_settings.h" @@ -30,18 +31,12 @@ namespace notifier { SingleLoginAttempt::SingleLoginAttempt(LoginSettings* login_settings) : login_settings_(login_settings), connection_generator_( + ALLOW_THIS_IN_INITIALIZER_LIST(this), login_settings_->host_resolver(), &login_settings_->connection_options(), login_settings_->try_ssltcp_first(), login_settings_->server_list(), login_settings_->server_count()) { - connection_generator_.SignalExhaustedSettings.connect( - this, - &SingleLoginAttempt::OnAttemptedAllConnections); - connection_generator_.SignalNewSettings.connect( - this, - &SingleLoginAttempt::DoLogin); - connection_generator_.StartGenerating(); } @@ -97,16 +92,7 @@ void SingleLoginAttempt::OnError(buzz::XmppEngine::Error error, int subcode, connection_generator_.UseNextConnection(); } -void SingleLoginAttempt::OnAttemptedAllConnections( - bool successfully_resolved_dns, - int first_dns_error) { - if (!successfully_resolved_dns) - VLOG(1) << "Could not resolve DNS: " << first_dns_error; - VLOG(1) << "Could not connect to any XMPP server"; - SignalNeedAutoReconnect(); -} - -void SingleLoginAttempt::DoLogin( +void SingleLoginAttempt::OnNewSettings( const ConnectionSettings& connection_settings) { // TODO(akalin): Resolve any unresolved IPs, possibly through a // proxy, instead of skipping them. @@ -130,4 +116,13 @@ void SingleLoginAttempt::DoLogin( new XmppConnection(client_settings, this, pre_xmpp_auth)); } +void SingleLoginAttempt::OnExhaustedSettings( + bool successfully_resolved_dns, + int first_dns_error) { + if (!successfully_resolved_dns) + VLOG(1) << "Could not resolve DNS: " << first_dns_error; + VLOG(1) << "Could not connect to any XMPP server"; + SignalNeedAutoReconnect(); +} + } // namespace notifier |