Index: chrome/browser/extensions/api/diagnostics/send_ping_packet.h |
diff --git a/chrome/browser/extensions/api/diagnostics/send_ping_packet.h b/chrome/browser/extensions/api/diagnostics/send_ping_packet.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7580f282e64feee2527bd0867b9455e3766adeaf |
--- /dev/null |
+++ b/chrome/browser/extensions/api/diagnostics/send_ping_packet.h |
@@ -0,0 +1,37 @@ |
+// 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_SEND_PING_PACKET_H_ |
+#define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_SEND_PING_PACKET_H_ |
+ |
+#include <string> |
+ |
+#include "base/callback.h" |
+ |
+namespace extensions { |
+ |
not at google - send to devlin
2013/06/20 23:32:12
this should be in a second nested namespace like s
Bei Zhang
2013/06/21 08:31:07
Done.
|
+enum SendPingPacketResultCode { |
+ SEND_PING_PACKET_OK, |
+ SEND_PING_PACKET_NOT_IMPLEMENTED, |
+ SEND_PING_PACKET_FAILED, |
+}; |
+ |
+// Callback for extensions::SendPingPacket |
+typedef base::Callback<void(SendPingPacketResultCode result_code, |
+ const std::string& ip, |
+ double latency)> |
+ SendPingPacketCallback; |
+ |
+// Sends an ICMP packet with given parameters. |
+// Passes NULL for omitted arguments. |
not at google - send to devlin
2013/06/20 23:32:12
You need to document that callback can be called s
Bei Zhang
2013/06/21 08:31:07
I removed this method. Now it's a private method i
|
+void SendPingPacket( |
+ const std::string& ip, |
+ const int* ttl, |
not at google - send to devlin
2013/06/20 23:32:12
as I said in the other file, it would be cleaner t
Bei Zhang
2013/06/21 08:31:07
Done.
|
+ const int* timeout, |
+ const int* size, |
+ const SendPingPacketCallback& callback); |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_SEND_PING_PACKET_H_ |