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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.h

Issue 10790137: Adds socket.getInfo to the socket API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Check for NULL TCPSocket, updated test Created 8 years, 4 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/socket/socket_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index 0523b947c8a1a76838a9d43c996381da1870cf9c..69406f12ceec1981fb77d2b4bb287731d169bba5 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -279,6 +279,23 @@ class SocketSetNoDelayFunction : public SocketAsyncApiFunction {
scoped_ptr<api::socket::SetNoDelay::Params> params_;
};
+class SocketGetInfoFunction : public SocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("socket.getInfo");
+
+ SocketGetInfoFunction();
+
+ protected:
+ virtual ~SocketGetInfoFunction();
+
+ // AsyncApiFunction:
+ virtual bool Prepare() OVERRIDE;
+ virtual void Work() OVERRIDE;
+
+ private:
+ scoped_ptr<api::socket::GetInfo::Params> params_;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_

Powered by Google App Engine
This is Rietveld 408576698