| 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 // Methods for sending the update stanza to notify peers via xmpp. | 5 // Methods for sending the update stanza to notify peers via xmpp. |
| 6 | 6 |
| 7 #ifndef JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_ | 7 #ifndef JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_ |
| 8 #define JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_ | 8 #define JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_ |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 virtual void OnPingResponseReceived() = 0; | 25 virtual void OnPingResponseReceived() = 0; |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 virtual ~Delegate(); | 28 virtual ~Delegate(); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 SendPingTask(buzz::XmppTaskParentInterface* parent, Delegate* delegate); | 31 SendPingTask(buzz::XmppTaskParentInterface* parent, Delegate* delegate); |
| 32 virtual ~SendPingTask(); | 32 virtual ~SendPingTask(); |
| 33 | 33 |
| 34 // Overridden from buzz::XmppTask. | 34 // Overridden from buzz::XmppTask. |
| 35 virtual int ProcessStart() OVERRIDE; | 35 virtual int ProcessStart() override; |
| 36 virtual int ProcessResponse() OVERRIDE; | 36 virtual int ProcessResponse() override; |
| 37 virtual bool HandleStanza(const buzz::XmlElement* stanza) OVERRIDE; | 37 virtual bool HandleStanza(const buzz::XmlElement* stanza) override; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 static buzz::XmlElement* MakePingStanza(const std::string& task_id); | 40 static buzz::XmlElement* MakePingStanza(const std::string& task_id); |
| 41 | 41 |
| 42 FRIEND_TEST_ALL_PREFIXES(SendPingTaskTest, MakePingStanza); | 42 FRIEND_TEST_ALL_PREFIXES(SendPingTaskTest, MakePingStanza); |
| 43 | 43 |
| 44 std::string ping_task_id_; | 44 std::string ping_task_id_; |
| 45 Delegate* delegate_; | 45 Delegate* delegate_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(SendPingTask); | 47 DISALLOW_COPY_AND_ASSIGN(SendPingTask); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 typedef SendPingTask::Delegate SendPingTaskDelegate; | 50 typedef SendPingTask::Delegate SendPingTaskDelegate; |
| 51 | 51 |
| 52 } // namespace notifier | 52 } // namespace notifier |
| 53 | 53 |
| 54 #endif // JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_ | 54 #endif // JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_ |
| OLD | NEW |