| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <cstddef> | 6 #include <cstddef> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "jingle/notifier/communicator/single_login_attempt.h" | 10 #include "jingle/notifier/communicator/single_login_attempt.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Fill in the rest of the client settings. | 108 // Fill in the rest of the client settings. |
| 109 connection_settings.FillXmppClientSettings(&client_settings); | 109 connection_settings.FillXmppClientSettings(&client_settings); |
| 110 | 110 |
| 111 buzz::Jid jid(client_settings.user(), client_settings.host(), | 111 buzz::Jid jid(client_settings.user(), client_settings.host(), |
| 112 buzz::STR_EMPTY); | 112 buzz::STR_EMPTY); |
| 113 buzz::PreXmppAuth* pre_xmpp_auth = | 113 buzz::PreXmppAuth* pre_xmpp_auth = |
| 114 new GaiaTokenPreXmppAuth( | 114 new GaiaTokenPreXmppAuth( |
| 115 jid.Str(), client_settings.auth_cookie(), | 115 jid.Str(), client_settings.auth_cookie(), |
| 116 client_settings.token_service()); | 116 client_settings.token_service()); |
| 117 xmpp_connection_.reset( | 117 xmpp_connection_.reset( |
| 118 new XmppConnection(client_settings, this, pre_xmpp_auth)); | 118 new XmppConnection(client_settings, login_settings_->cert_verifier(), |
| 119 this, pre_xmpp_auth)); |
| 119 } | 120 } |
| 120 | 121 |
| 121 void SingleLoginAttempt::OnExhaustedSettings( | 122 void SingleLoginAttempt::OnExhaustedSettings( |
| 122 bool successfully_resolved_dns, | 123 bool successfully_resolved_dns, |
| 123 int first_dns_error) { | 124 int first_dns_error) { |
| 124 if (!successfully_resolved_dns) | 125 if (!successfully_resolved_dns) |
| 125 VLOG(1) << "Could not resolve DNS: " << first_dns_error; | 126 VLOG(1) << "Could not resolve DNS: " << first_dns_error; |
| 126 VLOG(1) << "Could not connect to any XMPP server"; | 127 VLOG(1) << "Could not connect to any XMPP server"; |
| 127 delegate_->OnNeedReconnect(); | 128 delegate_->OnNeedReconnect(); |
| 128 } | 129 } |
| 129 | 130 |
| 130 } // namespace notifier | 131 } // namespace notifier |
| OLD | NEW |