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_LOGIN_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Starts connecting (or forces a reconnection if we're backed off). | 77 // Starts connecting (or forces a reconnection if we're backed off). |
78 void StartConnection(); | 78 void StartConnection(); |
79 | 79 |
80 // The updated settings take effect only the next time when a | 80 // The updated settings take effect only the next time when a |
81 // connection is attempted (either via reconnection or a call to | 81 // connection is attempted (either via reconnection or a call to |
82 // StartConnection()). | 82 // StartConnection()). |
83 void UpdateXmppSettings(const buzz::XmppClientSettings& user_settings); | 83 void UpdateXmppSettings(const buzz::XmppClientSettings& user_settings); |
84 | 84 |
85 // net::NetworkChangeNotifier::IPAddressObserver implementation. | 85 // net::NetworkChangeNotifier::IPAddressObserver implementation. |
86 virtual void OnIPAddressChanged() OVERRIDE; | 86 virtual void OnIPAddressChanged() override; |
87 | 87 |
88 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation. | 88 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation. |
89 virtual void OnConnectionTypeChanged( | 89 virtual void OnConnectionTypeChanged( |
90 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 90 net::NetworkChangeNotifier::ConnectionType type) override; |
91 | 91 |
92 // net::NetworkChangeNotifier::DNSObserver implementation. | 92 // net::NetworkChangeNotifier::DNSObserver implementation. |
93 virtual void OnDNSChanged() OVERRIDE; | 93 virtual void OnDNSChanged() override; |
94 | 94 |
95 // SingleLoginAttempt::Delegate implementation. | 95 // SingleLoginAttempt::Delegate implementation. |
96 virtual void OnConnect( | 96 virtual void OnConnect( |
97 base::WeakPtr<buzz::XmppTaskParentInterface> base_task) OVERRIDE; | 97 base::WeakPtr<buzz::XmppTaskParentInterface> base_task) override; |
98 virtual void OnRedirect(const ServerInformation& redirect_server) OVERRIDE; | 98 virtual void OnRedirect(const ServerInformation& redirect_server) override; |
99 virtual void OnCredentialsRejected() OVERRIDE; | 99 virtual void OnCredentialsRejected() override; |
100 virtual void OnSettingsExhausted() OVERRIDE; | 100 virtual void OnSettingsExhausted() override; |
101 | 101 |
102 private: | 102 private: |
103 // Called by the various network notifications. | 103 // Called by the various network notifications. |
104 void OnNetworkEvent(); | 104 void OnNetworkEvent(); |
105 | 105 |
106 // Stops any existing reconnect timer and sets an initial reconnect | 106 // Stops any existing reconnect timer and sets an initial reconnect |
107 // interval. | 107 // interval. |
108 void ResetReconnectState(); | 108 void ResetReconnectState(); |
109 | 109 |
110 // Tries to reconnect in some point in the future. If called | 110 // Tries to reconnect in some point in the future. If called |
(...skipping 11 matching lines...) Expand all Loading... |
122 // reconnection state. | 122 // reconnection state. |
123 base::TimeDelta reconnect_interval_; | 123 base::TimeDelta reconnect_interval_; |
124 base::OneShotTimer<Login> reconnect_timer_; | 124 base::OneShotTimer<Login> reconnect_timer_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(Login); | 126 DISALLOW_COPY_AND_ASSIGN(Login); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace notifier | 129 } // namespace notifier |
130 | 130 |
131 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 131 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
OLD | NEW |