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 { | |
13 | |
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.
| |
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. | |
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
| |
28 void SendPingPacket( | |
29 const std::string& ip, | |
30 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.
| |
31 const int* timeout, | |
32 const int* size, | |
33 const SendPingPacketCallback& callback); | |
34 | |
35 } // namespace extensions | |
36 | |
37 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_SEND_PING_PACKET_H_ | |
OLD | NEW |