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

Unified 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: Change latency type to double 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/ping_private/ping_private_api.h
diff --git a/chrome/browser/extensions/api/ping_private/ping_private_api.h b/chrome/browser/extensions/api/ping_private/ping_private_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..39966851e03adcfd78c1fbdab71d74195fd142cb
--- /dev/null
+++ b/chrome/browser/extensions/api/ping_private/ping_private_api.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_PING_PRIVATE_PING_PRIVATE_API_H_
+#define CHROME_BROWSER_EXTENSIONS_API_PING_PRIVATE_PING_PRIVATE_API_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/extensions/api/api_function.h"
+#include "chrome/browser/extensions/api/api_resource_manager.h"
+#include "chrome/common/extensions/api/ping_private.h"
+
+namespace extensions {
+
+class PingPrivateSendPacketFunction : public AsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("pingPrivate.sendPacket", PINGPRIVATE_SENDPACKET);
+ PingPrivateSendPacketFunction();
+
+ protected:
+ virtual ~PingPrivateSendPacketFunction();
+
stevenjb 2013/06/17 17:24:24 nit: Use a comment to note which class these are o
Bei Zhang 2013/06/18 18:00:41 Done.
+ virtual bool Prepare() OVERRIDE;
+
+ virtual void AsyncWorkStart() OVERRIDE;
+
+ virtual bool Respond() OVERRIDE;
+
+ private:
+ void OnComplete(bool succeed, const std::string& ip, double latency);
+
+ scoped_ptr<extensions::api::ping_private::SendPacket::Params> parameters_;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_PING_PRIVATE_PING_PRIVATE_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/ping_private/ping_private_api.cc » ('j') | chromeos/dbus/icmp_packet_sender.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698