OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_ | 5 #ifndef CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_ |
6 #define CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_ | 6 #define CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_ |
7 | 7 |
8 #include "talk/base/common.h" | |
9 #include "talk/xmpp/xmppengine.h" | 8 #include "talk/xmpp/xmppengine.h" |
10 | 9 |
11 namespace notifier { | 10 namespace notifier { |
12 | 11 |
13 class LoginFailure { | 12 class LoginFailure { |
14 public: | 13 public: |
15 enum LoginError { | 14 enum LoginError { |
16 // Check the xmpp_error for more information. | 15 // Check the xmpp_error for more information. |
17 XMPP_ERROR, | 16 XMPP_ERROR, |
18 | 17 |
(...skipping 15 matching lines...) Expand all Loading... |
34 return error_; | 33 return error_; |
35 } | 34 } |
36 | 35 |
37 // Returns the XmppEngine only. Valid if and only if error() == XMPP_ERROR. | 36 // Returns the XmppEngine only. Valid if and only if error() == XMPP_ERROR. |
38 // | 37 // |
39 // Handler should mimic logic from PhoneWindow::ShowConnectionError | 38 // Handler should mimic logic from PhoneWindow::ShowConnectionError |
40 // (except that the DiagnoseConnectionError has already been done). | 39 // (except that the DiagnoseConnectionError has already been done). |
41 buzz::XmppEngine::Error xmpp_error() const; | 40 buzz::XmppEngine::Error xmpp_error() const; |
42 | 41 |
43 private: | 42 private: |
44 LoginError error_; | 43 const LoginError error_; |
45 buzz::XmppEngine::Error xmpp_error_; | 44 const buzz::XmppEngine::Error xmpp_error_; |
46 int subcode_; | 45 const int subcode_; |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(LoginFailure); | |
49 }; | 46 }; |
50 | 47 |
51 } // namespace notifier | 48 } // namespace notifier |
52 | 49 |
53 #endif // CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_ | 50 #endif // CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_ |
OLD | NEW |