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

Issue 10790137: Adds socket.getInfo to the socket API (Closed)

Created:
8 years, 5 months ago by thorogood
Modified:
8 years, 4 months ago
Reviewers:
miket_OOO, Peng, benwells
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, benwells
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Adds socket.getInfo to the socket API Allows clients to retrieve the state of a specified socket. BUG=135464 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150190

Patch Set 1 #

Patch Set 2 : Adds tests #

Total comments: 4

Patch Set 3 : Broke apart local/peer into localAddress,localPort peerAddress,peerPort, and updated the docs #

Total comments: 8

Patch Set 4 : Uses generated struct, updates docs slightly #

Total comments: 1

Patch Set 5 : Socket updates #

Total comments: 2

Patch Set 6 : Better comments, nit fix #

Total comments: 10

Patch Set 7 : comment updates #

Patch Set 8 : Merge to head #

Patch Set 9 : Check for NULL TCPSocket, updated test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+813 lines, -15 lines) Patch
M chrome/browser/extensions/api/socket/socket.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.h View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.cc View 1 2 3 4 5 6 7 8 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/tcp_socket.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/tcp_socket.cc View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/udp_socket.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/udp_socket.cc View 1 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/socket.idl View 1 2 3 4 5 6 7 5 chunks +48 lines, -4 lines 3 comments Download
M chrome/common/extensions/docs/apps/socket.html View 1 2 3 4 5 6 7 8 chunks +285 lines, -4 lines 0 comments Download
M chrome/common/extensions/docs/extensions/socket.html View 1 2 3 4 5 6 7 8 chunks +324 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/socket/api/background.js View 1 2 3 4 5 6 7 8 3 chunks +49 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
thorogood
Ben has volunteered to take a quick look.
8 years, 5 months ago (2012-07-24 07:58:53 UTC) #1
benwells
I've only had a very quick look... https://chromiumcodereview.appspot.com/10790137/diff/2001/chrome/common/extensions/api/experimental_socket.idl File chrome/common/extensions/api/experimental_socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/2001/chrome/common/extensions/api/experimental_socket.idl#newcode64 chrome/common/extensions/api/experimental_socket.idl:64: // in ...
8 years, 5 months ago (2012-07-24 08:05:33 UTC) #2
thorogood
PTAL https://chromiumcodereview.appspot.com/10790137/diff/2001/chrome/common/extensions/api/experimental_socket.idl File chrome/common/extensions/api/experimental_socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/2001/chrome/common/extensions/api/experimental_socket.idl#newcode64 chrome/common/extensions/api/experimental_socket.idl:64: // in the form <code>ip:port</code>, e.g., <code>10.0.0.1:1234</code>. On ...
8 years, 4 months ago (2012-07-26 01:49:59 UTC) #3
benwells
https://chromiumcodereview.appspot.com/10790137/diff/7001/chrome/browser/extensions/api/socket/socket_api.cc File chrome/browser/extensions/api/socket/socket_api.cc (right): https://chromiumcodereview.appspot.com/10790137/diff/7001/chrome/browser/extensions/api/socket/socket_api.cc#newcode473 chrome/browser/extensions/api/socket/socket_api.cc:473: result->Set(kSocketTypeKey, Value::CreateStringValue(type)); I think there is a nicer way ...
8 years, 4 months ago (2012-07-26 04:18:37 UTC) #4
thorogood
https://chromiumcodereview.appspot.com/10790137/diff/7001/chrome/browser/extensions/api/socket/socket_api.cc File chrome/browser/extensions/api/socket/socket_api.cc (right): https://chromiumcodereview.appspot.com/10790137/diff/7001/chrome/browser/extensions/api/socket/socket_api.cc#newcode473 chrome/browser/extensions/api/socket/socket_api.cc:473: result->Set(kSocketTypeKey, Value::CreateStringValue(type)); On 2012/07/26 04:18:37, benwells wrote: > I ...
8 years, 4 months ago (2012-07-26 06:19:50 UTC) #5
thorogood
https://chromiumcodereview.appspot.com/10790137/diff/13001/chrome/common/extensions/api/experimental_socket.idl File chrome/common/extensions/api/experimental_socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/13001/chrome/common/extensions/api/experimental_socket.idl#newcode64 chrome/common/extensions/api/experimental_socket.idl:64: // Whether this socket is currently connected. Ben, I've ...
8 years, 4 months ago (2012-07-27 03:46:50 UTC) #6
benwells
lgtm https://chromiumcodereview.appspot.com/10790137/diff/15002/chrome/browser/extensions/api/socket/socket_api.cc File chrome/browser/extensions/api/socket/socket_api.cc (right): https://chromiumcodereview.appspot.com/10790137/diff/15002/chrome/browser/extensions/api/socket/socket_api.cc#newcode451 chrome/browser/extensions/api/socket/socket_api.cc:451: : params_(NULL) { Nit: can use {} on ...
8 years, 4 months ago (2012-07-30 00:47:58 UTC) #7
thorogood
ping miket@. I've also updated the comments slightly _again_ because this morning I finally got ...
8 years, 4 months ago (2012-07-30 07:22:18 UTC) #8
miket_OOO
I've added a few comments about the documentation. You might want to consider adding penghuang, ...
8 years, 4 months ago (2012-07-30 16:53:10 UTC) #9
thorogood
+penghuang https://chromiumcodereview.appspot.com/10790137/diff/9007/chrome/common/extensions/api/experimental_socket.idl File chrome/common/extensions/api/experimental_socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/9007/chrome/common/extensions/api/experimental_socket.idl#newcode69 chrome/common/extensions/api/experimental_socket.idl:69: // <code>disconnect()</code>. On 2012/07/30 16:53:10, miket wrote: > ...
8 years, 4 months ago (2012-07-31 01:21:09 UTC) #10
Peng
https://chromiumcodereview.appspot.com/10790137/diff/9007/chrome/browser/extensions/api/socket/tcp_socket.cc File chrome/browser/extensions/api/socket/tcp_socket.cc (right): https://chromiumcodereview.appspot.com/10790137/diff/9007/chrome/browser/extensions/api/socket/tcp_socket.cc#newcode148 chrome/browser/extensions/api/socket/tcp_socket.cc:148: return !socket_->GetPeerAddress(address); I am not sure if socket is ...
8 years, 4 months ago (2012-07-31 16:15:37 UTC) #11
thorogood
Thanks for noticing the NPE. Fix added, API test modified to check default state of ...
8 years, 4 months ago (2012-08-03 03:24:12 UTC) #12
Peng
lgtm with one comment. https://chromiumcodereview.appspot.com/10790137/diff/20013/chrome/common/extensions/api/socket.idl File chrome/common/extensions/api/socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/20013/chrome/common/extensions/api/socket.idl#newcode204 chrome/common/extensions/api/socket.idl:204: static void getInfo(long socketId, I ...
8 years, 4 months ago (2012-08-03 14:13:36 UTC) #13
thorogood
Ping miket@ again. :) https://chromiumcodereview.appspot.com/10790137/diff/20013/chrome/common/extensions/api/socket.idl File chrome/common/extensions/api/socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/20013/chrome/common/extensions/api/socket.idl#newcode204 chrome/common/extensions/api/socket.idl:204: static void getInfo(long socketId, On ...
8 years, 4 months ago (2012-08-05 02:22:57 UTC) #14
miket_OOO
lgtm https://chromiumcodereview.appspot.com/10790137/diff/20013/chrome/common/extensions/api/socket.idl File chrome/common/extensions/api/socket.idl (right): https://chromiumcodereview.appspot.com/10790137/diff/20013/chrome/common/extensions/api/socket.idl#newcode204 chrome/common/extensions/api/socket.idl:204: static void getInfo(long socketId, On 2012/08/05 02:22:57, thorogood ...
8 years, 4 months ago (2012-08-06 21:47:53 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10790137/20013
8 years, 4 months ago (2012-08-06 23:15:02 UTC) #16
commit-bot: I haz the power
8 years, 4 months ago (2012-08-07 00:30:01 UTC) #17
Change committed as 150190

Powered by Google App Engine
This is Rietveld 408576698