Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_SEND_PING_PACKET_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_SEND_PING_PACKET_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace extensions { | |
|
asargent_no_longer_on_chrome
2013/06/20 22:51:29
optional suggestion: It might make more sense to h
| |
| 13 | |
| 14 enum SendPingPacketResultCode { | |
| 15 SEND_PING_PACKET_OK, | |
| 16 SEND_PING_PACKET_NOT_IMPLEMENTED, | |
| 17 SEND_PING_PACKET_FAILED, | |
| 18 }; | |
| 19 | |
| 20 // Callback for extensions::SendPingPacket | |
| 21 typedef base::Callback<void(SendPingPacketResultCode result_code, | |
| 22 const std::string& ip, | |
| 23 double latency)> | |
| 24 SendPingPacketCallback; | |
| 25 | |
| 26 // Sends an ICMP packet with given parameters. | |
| 27 // Passes NULL for omitted arguments. | |
| 28 void SendPingPacket( | |
| 29 const std::string& ip, | |
| 30 const int* ttl, | |
| 31 const int* timeout, | |
| 32 const int* size, | |
|
asargent_no_longer_on_chrome
2013/06/20 22:51:29
nit: you should just pass the integer values here
Bei Zhang
2013/06/21 08:31:07
Done.
| |
| 33 const SendPingPacketCallback& callback); | |
| 34 | |
| 35 } // namespace extensions | |
| 36 | |
| 37 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_SEND_PING_PACKET_H_ | |
| OLD | NEW |