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

Unified Diff: chrome/browser/extensions/api/socket/socket.cc

Issue 10827390: Implement chrome.socket.bind/listen/accept for TCP server socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add error if trying to bind TCP socket, remove TCP client socket bind. Created 8 years, 3 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.cc
diff --git a/chrome/browser/extensions/api/socket/socket.cc b/chrome/browser/extensions/api/socket/socket.cc
index 3d297217896471e1bcdcdc04a870891dc1532d70..34bb4f5dfe6a562b6b62383ab4f6c1374bb460a1 100644
--- a/chrome/browser/extensions/api/socket/socket.cc
+++ b/chrome/browser/extensions/api/socket/socket.cc
@@ -87,6 +87,15 @@ bool Socket::SetNoDelay(bool no_delay) {
return false;
}
+int Socket::Listen(const std::string& address, int port, int backlog,
+ std::string* error_msg) {
miket_OOO 2012/09/24 18:14:21 Can you put NOTREACHED in here? I think we want to
justinlin 2012/09/26 08:59:59 Done. This will happen if you try to call listen/a
miket_OOO 2012/09/26 17:17:55 Oh, OK, then my request was in error. NOTREACHED i
justinlin 2012/09/26 20:53:12 Done. Yea, I agree NOT_IMPLEMENTED might not be th
+ return net::ERR_NOT_IMPLEMENTED;
+}
+
+void Socket::Accept(const AcceptCompletionCallback& callback) {
+ callback.Run(net::ERR_NOT_IMPLEMENTED, NULL);
miket_OOO 2012/09/24 18:14:21 Same.
justinlin 2012/09/26 08:59:59 Done.
+}
+
// static
bool Socket::StringAndPortToIPEndPoint(const std::string& ip_address_str,
int port,

Powered by Google App Engine
This is Rietveld 408576698