Index: chrome/browser/extensions/api/diagnostics_private/send_ping_packet.h |
diff --git a/chrome/browser/extensions/api/diagnostics_private/send_ping_packet.h b/chrome/browser/extensions/api/diagnostics_private/send_ping_packet.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c1faf758dee266af8d711a7e7934452232a7b8b |
--- /dev/null |
+++ b/chrome/browser/extensions/api/diagnostics_private/send_ping_packet.h |
@@ -0,0 +1,33 @@ |
+// 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 CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_SEND_PING_PACKET_H_ |
+#define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_SEND_PING_PACKET_H_ |
+ |
+#include <string> |
+ |
+#include "base/callback.h" |
+ |
+namespace extensions { |
+ |
+// Callback for extensions::SendPingPacket |
+// |error| is an empty string if there is no error. |
+// Otherwise the |ip| and |latency| arguments are not defined. |
stevenjb
2013/06/18 19:19:28
This is an odd API (and the comment is kind of con
Bei Zhang
2013/06/18 22:04:46
Done.
|
+typedef base::Callback<void(const std::string& error, |
+ const std::string& ip, |
+ double latency)> |
+ SendPingPacketCallback; |
+ |
+// Sends an ICMP packet with given parameters. |
+// Passs NULL for omitted arguments. |
+void SendPingPacket( |
+ const std::string& ip, |
+ const int* ttl, |
+ const int* timeout, |
+ const int* size, |
+ const SendPingPacketCallback& callback); |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_SEND_PING_PACKET_H_ |