OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_DBUS_PACKET_SENDER_H_ | |
6 #define CHROMEOS_DBUS_PACKET_SENDER_H_ | |
7 | |
8 #include "base/callback.h" | |
9 #include "base/values.h" | |
10 #include "chromeos/chromeos_export.h" | |
11 | |
12 namespace chromeos { | |
13 | |
14 class CHROMEOS_EXPORT PacketSender { | |
15 public: | |
16 typedef base::Callback<void(bool succeeded, | |
17 std::string ip, int latency)> SendCallback; | |
xiaowenx
2013/06/17 06:19:38
can we use const std::string& ip here?
Bei Zhang
2013/06/17 07:30:54
Done.
Bei Zhang
2013/06/17 07:30:54
Done.
| |
18 PacketSender(); | |
19 virtual ~PacketSender(); | |
xiaowenx
2013/06/17 06:19:38
is there a reason to use virtual destructor?
| |
20 void Send(std::string ip, std::string type, int ttl, int timeout, int size, | |
xiaowenx
2013/06/17 06:19:38
can we use const std::string& ip here?
Bei Zhang
2013/06/17 07:30:54
Done.
| |
21 const SendCallback& callback); | |
22 | |
23 static PacketSender* GetInstance(); | |
24 private: | |
25 void OnSend(const SendCallback& callback, | |
26 bool succeeded, const std::string& reply); | |
27 }; | |
28 | |
29 } // namespace chromeos | |
xiaowenx
2013/06/17 06:19:38
it looks better to insert an empty line here :)
Bei Zhang
2013/06/17 07:30:54
Done.
| |
30 #endif // CHROMEOS_DBUS_PACKET_SENDER_H_ | |
OLD | NEW |