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

Unified 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: Fixes as per Xiaowen 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/debug_daemon_client.cc ('k') | chromeos/dbus/icmp_packet_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/icmp_packet_sender.h
diff --git a/chromeos/dbus/icmp_packet_sender.h b/chromeos/dbus/icmp_packet_sender.h
new file mode 100644
index 0000000000000000000000000000000000000000..0cb8ade409d5f82830204960d03aa8c0249fe357
--- /dev/null
+++ b/chromeos/dbus/icmp_packet_sender.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_
+#define CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_
+
+#include "base/callback.h"
+#include "base/values.h"
xiaowenx 2013/06/17 08:00:00 this include seems unnecessary?
Bei Zhang 2013/06/17 08:14:57 Done.
+#include "chromeos/chromeos_export.h"
+
+namespace chromeos {
+
+class CHROMEOS_EXPORT ICMPPacketSender {
+ public:
+ typedef base::Callback<void(bool succeeded,
+ const std::string& ip,
+ int latency)> SendCallback;
+ ICMPPacketSender();
+ ~ICMPPacketSender();
+
+ // Send ICMP packet with given parameters.
+ // If omitted
xiaowenx 2013/06/17 08:00:00 If omitted?
+ void Send(const std::string& ip, int* ttl, int* timeout, int* size,
+ const SendCallback& callback);
+
+ static ICMPPacketSender* GetInstance();
+ private:
+ void OnSend(const SendCallback& callback,
+ bool succeeded, const std::string& reply);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_
« no previous file with comments | « chromeos/dbus/debug_daemon_client.cc ('k') | chromeos/dbus/icmp_packet_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698