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

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: Change latency type to double 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
8 #include <string>
9
10 #include "base/callback.h"
11 #include "chromeos/chromeos_export.h"
12
13 namespace chromeos {
14
15 class CHROMEOS_EXPORT ICMPPacketSender {
16 public:
17 typedef base::Callback<void(bool succeeded,
18 const std::string& ip,
19 double latency)> SendCallback;
20 ICMPPacketSender();
21 ~ICMPPacketSender();
22
23 // Send ICMP packet with given parameters.
24 // Pass NULL for omitted argument.
stevenjb 2013/06/17 17:24:24 s/Send/Sends/ s/Pass/Passes/ s/argument/arguments/
Bei Zhang 2013/06/18 18:00:41 Done.
25 void Send(const std::string& ip, int* ttl, int* timeout, int* size,
stevenjb 2013/06/17 17:24:24 Use const int* for optional input parameters.
Bei Zhang 2013/06/18 18:00:41 Done.
26 const SendCallback& callback);
stevenjb 2013/06/17 17:24:24 One parameter per line
Bei Zhang 2013/06/18 18:00:41 Done.
27
28 static ICMPPacketSender* GetInstance();
stevenjb 2013/06/17 17:24:24 nit: blank line
Bei Zhang 2013/06/18 18:00:41 Done.
29 private:
30 void OnSend(const SendCallback& callback,
31 bool succeeded, const std::string& reply);
stevenjb 2013/06/17 17:24:24 One param per line (but see note about making this
Bei Zhang 2013/06/18 18:00:41 Done.
32 };
33
34 } // namespace chromeos
35
36 #endif // CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698