Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/extensions/api/diagnostics_private/send_ping_packet.h

Issue 17210002: Connectivity Diagnostics API: chrome.diagnostics.sendPacket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 enum SendPingPacketErrorCode {
stevenjb 2013/06/18 22:14:51 This should really be SendPingPacketResultCode sin
Bei Zhang 2013/06/18 23:48:40 Done.
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(SendPingPacketErrorCode error_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,
33 const SendPingPacketCallback& callback);
34
35 } // namespace extensions
36
37 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_SEND_PING_PACKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698