OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_SINGLE_LOGIN_ATTEMPT_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_SINGLE_LOGIN_ATTEMPT_H_ |
6 #define JINGLE_NOTIFIER_COMMUNICATOR_SINGLE_LOGIN_ATTEMPT_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_SINGLE_LOGIN_ATTEMPT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "jingle/notifier/base/xmpp_connection.h" | 10 #include "jingle/notifier/base/xmpp_connection.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 virtual ~Delegate(); | 54 virtual ~Delegate(); |
55 }; | 55 }; |
56 | 56 |
57 // Does not take ownership of |delegate|, which must not be NULL. | 57 // Does not take ownership of |delegate|, which must not be NULL. |
58 SingleLoginAttempt(const LoginSettings& login_settings, Delegate* delegate); | 58 SingleLoginAttempt(const LoginSettings& login_settings, Delegate* delegate); |
59 | 59 |
60 virtual ~SingleLoginAttempt(); | 60 virtual ~SingleLoginAttempt(); |
61 | 61 |
62 // XmppConnection::Delegate implementation. | 62 // XmppConnection::Delegate implementation. |
63 virtual void OnConnect( | 63 virtual void OnConnect( |
64 base::WeakPtr<buzz::XmppTaskParentInterface> parent) OVERRIDE; | 64 base::WeakPtr<buzz::XmppTaskParentInterface> parent) override; |
65 virtual void OnError(buzz::XmppEngine::Error error, | 65 virtual void OnError(buzz::XmppEngine::Error error, |
66 int error_subcode, | 66 int error_subcode, |
67 const buzz::XmlElement* stream_error) OVERRIDE; | 67 const buzz::XmlElement* stream_error) override; |
68 | 68 |
69 private: | 69 private: |
70 void TryConnect(const ConnectionSettings& new_settings); | 70 void TryConnect(const ConnectionSettings& new_settings); |
71 | 71 |
72 const LoginSettings login_settings_; | 72 const LoginSettings login_settings_; |
73 Delegate* const delegate_; | 73 Delegate* const delegate_; |
74 const ConnectionSettingsList settings_list_; | 74 const ConnectionSettingsList settings_list_; |
75 ConnectionSettingsList::const_iterator current_settings_; | 75 ConnectionSettingsList::const_iterator current_settings_; |
76 scoped_ptr<XmppConnection> xmpp_connection_; | 76 scoped_ptr<XmppConnection> xmpp_connection_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(SingleLoginAttempt); | 78 DISALLOW_COPY_AND_ASSIGN(SingleLoginAttempt); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace notifier | 81 } // namespace notifier |
82 | 82 |
83 #endif // JINGLE_NOTIFIER_COMMUNICATOR_SINGLE_LOGIN_ATTEMPT_H_ | 83 #endif // JINGLE_NOTIFIER_COMMUNICATOR_SINGLE_LOGIN_ATTEMPT_H_ |
OLD | NEW |