Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Side by Side Diff: chromeos/dbus/icmp_packet_sender.h

Issue 17210002: Connectivity Diagnostics API: chrome.diagnostics.sendPacket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use avg instead of time Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_ICMP_PACKET_SENDER_H_
6 #define CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_
7
xiaowenx 2013/06/17 08:19:55 #include <string>
Bei Zhang 2013/06/17 09:13:11 Done.
8 #include "base/callback.h"
9 #include "chromeos/chromeos_export.h"
10
11 namespace chromeos {
12
13 class CHROMEOS_EXPORT ICMPPacketSender {
14 public:
15 typedef base::Callback<void(bool succeeded,
16 const std::string& ip,
17 int latency)> SendCallback;
xiaowenx 2013/06/17 08:41:32 double latency
Bei Zhang 2013/06/17 09:13:11 Done.
18 ICMPPacketSender();
19 ~ICMPPacketSender();
20
21 // Send ICMP packet with given parameters.
22 // Pass NULL for omitted argument.
23 void Send(const std::string& ip, int* ttl, int* timeout, int* size,
24 const SendCallback& callback);
25
26 static ICMPPacketSender* GetInstance();
27 private:
28 void OnSend(const SendCallback& callback,
29 bool succeeded, const std::string& reply);
30 };
31
32 } // namespace chromeos
33
34 #endif // CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698