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_PRIVATE_SEND_PING_PACKET_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_SEND_PING_PACKET_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace extensions { | |
| 13 | |
| 14 // Callback for extensions::SendPingPacket | |
| 15 // |error| is an empty string if there is no error. | |
| 16 // 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.
| |
| 17 typedef base::Callback<void(const std::string& error, | |
| 18 const std::string& ip, | |
| 19 double latency)> | |
| 20 SendPingPacketCallback; | |
| 21 | |
| 22 // Sends an ICMP packet with given parameters. | |
| 23 // Passs NULL for omitted arguments. | |
| 24 void SendPingPacket( | |
| 25 const std::string& ip, | |
| 26 const int* ttl, | |
| 27 const int* timeout, | |
| 28 const int* size, | |
| 29 const SendPingPacketCallback& callback); | |
| 30 | |
| 31 } // namespace extensions | |
| 32 | |
| 33 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_SEND_PING_PACKET_H_ | |
| OLD | NEW |