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

Issue 10273016: Refactor the socket API to remove onEvent callback in socket.create() function. (Closed)

Created:
8 years, 7 months ago by Peng
Modified:
8 years, 7 months ago
Reviewers:
miket_OOO, jeremya, asanka, agl
CC:
bryeung, Mihai Parparita -not on Chrome, jeremya, chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Refactor the socket API to remove onEvent callback in socket.create() function. BUG=None TEST=browser_tests --gtest_filter=SocketApiTest.* TEST=unit_tests --gtest_filter=SocketTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135709

Patch Set 1 #

Patch Set 2 : Update #

Patch Set 3 : Update #

Patch Set 4 : Fix review issues #

Total comments: 11

Patch Set 5 : Update #

Patch Set 6 : Fix review issues #

Total comments: 1

Patch Set 7 : Update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+577 lines, -475 lines) Patch
M chrome/browser/extensions/api/api_function.h View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/api_function.cc View 1 2 2 chunks +43 lines, -28 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket.h View 1 2 3 4 chunks +23 lines, -17 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket.cc View 1 2 3 4 1 chunk +0 lines, -24 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.h View 1 9 chunks +31 lines, -25 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.cc View 1 2 12 chunks +83 lines, -72 lines 0 comments Download
M chrome/browser/extensions/api/socket/tcp_socket.h View 1 1 chunk +26 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/socket/tcp_socket.cc View 1 2 3 4 6 2 chunks +115 lines, -41 lines 0 comments Download
M chrome/browser/extensions/api/socket/tcp_socket_unittest.cc View 1 2 chunks +26 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/socket/udp_socket.h View 1 2 3 1 chunk +34 lines, -12 lines 0 comments Download
M chrome/browser/extensions/api/socket/udp_socket.cc View 1 2 3 4 6 2 chunks +184 lines, -51 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/common/extensions/api/experimental.socket.idl View 1 2 2 chunks +3 lines, -37 lines 0 comments Download
D chrome/renderer/extensions/experimental.socket_custom_bindings.h View 1 1 chunk +0 lines, -21 lines 0 comments Download
D chrome/renderer/extensions/experimental.socket_custom_bindings.cc View 1 1 chunk +0 lines, -32 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.cc View 1 2 3 4 5 6 4 chunks +0 lines, -6 lines 0 comments Download
M chrome/renderer/renderer_resources.grd View 1 1 chunk +0 lines, -1 line 0 comments Download
D chrome/renderer/resources/extensions/experimental.socket_custom_bindings.js View 1 1 chunk +0 lines, -64 lines 0 comments Download
M chrome/test/data/extensions/api_test/socket/api/background.js View 1 2 6 chunks +2 lines, -17 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Peng
Hi Mike and Jeremy, Could you please review this CL? Thank you.
8 years, 7 months ago (2012-05-02 18:37:36 UTC) #1
miket_OOO
LGTM. A few nits and one interesting question about ERR_IO_PENDING. http://codereview.chromium.org/10273016/diff/25002/chrome/browser/extensions/api/socket/tcp_socket.cc File chrome/browser/extensions/api/socket/tcp_socket.cc (right): http://codereview.chromium.org/10273016/diff/25002/chrome/browser/extensions/api/socket/tcp_socket.cc#newcode47 ...
8 years, 7 months ago (2012-05-03 17:08:13 UTC) #2
Peng
http://codereview.chromium.org/10273016/diff/25002/chrome/browser/extensions/api/socket/tcp_socket.cc File chrome/browser/extensions/api/socket/tcp_socket.cc (right): http://codereview.chromium.org/10273016/diff/25002/chrome/browser/extensions/api/socket/tcp_socket.cc#newcode47 chrome/browser/extensions/api/socket/tcp_socket.cc:47: callback.Run(net::ERR_IO_PENDING); On 2012/05/03 17:08:13, miket wrote: > Is there ...
8 years, 7 months ago (2012-05-03 19:21:50 UTC) #3
miket_OOO
> I can not find any better errors than IO_PENDING in net/base/net_error_list.h. > Do you ...
8 years, 7 months ago (2012-05-03 20:03:31 UTC) #4
Peng
Hi agl, Could you please review changes in net/ folder? Thanks. On 2012/05/03 20:03:31, miket ...
8 years, 7 months ago (2012-05-03 20:34:26 UTC) #5
jeremya
Why did we decide not to go the 'data' event route? http://codereview.chromium.org/10273016/diff/25002/chrome/browser/extensions/api/socket/tcp_socket.cc File chrome/browser/extensions/api/socket/tcp_socket.cc (right): ...
8 years, 7 months ago (2012-05-04 00:37:59 UTC) #6
agl
http://codereview.chromium.org/10273016/diff/36001/chrome/browser/extensions/api/socket/tcp_socket.cc File chrome/browser/extensions/api/socket/tcp_socket.cc (right): http://codereview.chromium.org/10273016/diff/36001/chrome/browser/extensions/api/socket/tcp_socket.cc#newcode89 chrome/browser/extensions/api/socket/tcp_socket.cc:89: callback.Run(net::ERR_TRY_AGAIN, NULL); In net/ there is a convention that ...
8 years, 7 months ago (2012-05-04 16:52:17 UTC) #7
Peng
On 2012/05/04 16:52:17, agl wrote: > http://codereview.chromium.org/10273016/diff/36001/chrome/browser/extensions/api/socket/tcp_socket.cc > File chrome/browser/extensions/api/socket/tcp_socket.cc (right): > > http://codereview.chromium.org/10273016/diff/36001/chrome/browser/extensions/api/socket/tcp_socket.cc#newcode89 > ...
8 years, 7 months ago (2012-05-07 15:27:42 UTC) #8
Peng
On 2012/05/04 00:37:59, jeremya wrote: > Why did we decide not to go the 'data' ...
8 years, 7 months ago (2012-05-07 15:28:41 UTC) #9
agl
Thanks. As this CL no longer has any changes in net/, I don't believe that ...
8 years, 7 months ago (2012-05-07 15:30:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/penghuang@chromium.org/10273016/41001
8 years, 7 months ago (2012-05-07 16:00:01 UTC) #11
commit-bot: I haz the power
8 years, 7 months ago (2012-05-07 20:10:09 UTC) #12
Change committed as 135709

Powered by Google App Engine
This is Rietveld 408576698