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

Side by Side Diff: chromeos/dbus/packet_sender.h

Issue 17210002: Connectivity Diagnostics API: chrome.diagnostics.sendPacket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 CHROMEOS_DBUS_PACKET_SENDER_H_
6 #define CHROMEOS_DBUS_PACKET_SENDER_H_
7
8 #include "base/callback.h"
9 #include "base/values.h"
10 #include "chromeos/chromeos_export.h"
11
12 namespace chromeos {
13
14 class CHROMEOS_EXPORT PacketSender {
15 public:
16 typedef base::Callback<void(bool succeeded,
17 std::string ip, int latency)> SendCallback;
xiaowenx 2013/06/17 06:19:38 can we use const std::string& ip here?
Bei Zhang 2013/06/17 07:30:54 Done.
Bei Zhang 2013/06/17 07:30:54 Done.
18 PacketSender();
19 virtual ~PacketSender();
xiaowenx 2013/06/17 06:19:38 is there a reason to use virtual destructor?
20 void Send(std::string ip, std::string type, int ttl, int timeout, int size,
xiaowenx 2013/06/17 06:19:38 can we use const std::string& ip here?
Bei Zhang 2013/06/17 07:30:54 Done.
21 const SendCallback& callback);
22
23 static PacketSender* GetInstance();
24 private:
25 void OnSend(const SendCallback& callback,
26 bool succeeded, const std::string& reply);
27 };
28
29 } // namespace chromeos
xiaowenx 2013/06/17 06:19:38 it looks better to insert an empty line here :)
Bei Zhang 2013/06/17 07:30:54 Done.
30 #endif // CHROMEOS_DBUS_PACKET_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698