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

Side by Side Diff: chrome/browser/extensions/api/ping_private/ping_private_api.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 CHROME_BROWSER_EXTENSIONS_API_PING_PRIVATE_PING_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_PING_PRIVATE_PING_PRIVATE_API_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
xiaowenx 2013/06/17 06:19:38 The code uses scoped_ptr<>, should it include "bas
Bei Zhang 2013/06/17 07:30:54 Done.
11 #include "chrome/browser/extensions/api/api_function.h"
12 #include "chrome/browser/extensions/api/api_resource_manager.h"
13 #include "chrome/common/extensions/api/ping_private.h"
14
15 namespace extensions {
16
17 class PingPrivateSendPacketFunction : public AsyncApiFunction {
18 public:
19 DECLARE_EXTENSION_FUNCTION("pingPrivate.sendPacket", PINGPRIVATE_SENDPACKET);
20 PingPrivateSendPacketFunction();
21
22 protected:
23 virtual ~PingPrivateSendPacketFunction();
24
25 virtual bool Prepare() OVERRIDE;
26
27 virtual void AsyncWorkStart() OVERRIDE;
28
29 virtual bool Respond() OVERRIDE;
30
31 private:
32 void OnComplete(bool succeed, std::string ip, int latency);
xiaowenx 2013/06/17 06:19:38 const std::string& ip?
Bei Zhang 2013/06/17 07:30:54 Done.
33
34 scoped_ptr<extensions::api::ping_private::SendPacket::Params> parameters_;
35 };
36
37 } // namespace extensions
38
39 #endif // CHROME_BROWSER_EXTENSIONS_API_PING_PRIVATE_PING_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698