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

Issue 79673003: Refactor CastSocket code for the following: (Closed)

Created:
7 years, 1 month ago by Munjal (Google)
Modified:
6 years, 11 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Refactor CastSocket code for the following: - Refactor the Write code to avoid recursion - Refactor the read code to avoid recursion - With read code refactored, hook it up appropriately with connection flow to avoid re-entrancy of DoConnectLoop Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242158

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 11

Patch Set 7 : #

Patch Set 8 : #

Total comments: 36

Patch Set 9 : #

Patch Set 10 : #

Total comments: 11

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Total comments: 5

Patch Set 16 : #

Patch Set 17 : #

Total comments: 34

Patch Set 18 : #

Total comments: 10

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Patch Set 23 : #

Patch Set 24 : #

Patch Set 25 : #

Patch Set 26 : #

Total comments: 23

Patch Set 27 : #

Patch Set 28 : #

Total comments: 6

Patch Set 29 : #

Patch Set 30 : #

Total comments: 2

Patch Set 31 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1128 lines, -750 lines) Patch
M chrome/browser/extensions/api/cast_channel/cast_message_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 chunks +23 lines, -20 lines 0 comments Download
M chrome/browser/extensions/api/cast_channel/cast_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 11 chunks +114 lines, -75 lines 0 comments Download
M chrome/browser/extensions/api/cast_channel/cast_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 14 chunks +315 lines, -213 lines 0 comments Download
M chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 10 chunks +675 lines, -442 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
Munjal (Google)
Note that this is just for the initial review of hte approach. I am going ...
7 years, 1 month ago (2013-11-21 00:21:13 UTC) #1
Munjal (Google)
7 years, 1 month ago (2013-11-21 19:29:03 UTC) #2
Munjal (Google)
7 years, 1 month ago (2013-11-21 19:30:30 UTC) #3
Munjal (Google)
7 years, 1 month ago (2013-11-21 19:31:51 UTC) #4
Ryan Sleevi
https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode157 chrome/browser/extensions/api/cast_channel/cast_socket.cc:157: void CastSocket::Connect(const net::CompletionCallback& callback) { This is an area ...
7 years, 1 month ago (2013-11-21 22:16:15 UTC) #5
Munjal (Google)
https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode157 chrome/browser/extensions/api/cast_channel/cast_socket.cc:157: void CastSocket::Connect(const net::CompletionCallback& callback) { On 2013/11/21 22:16:15, Ryan ...
7 years, 1 month ago (2013-11-21 22:44:11 UTC) #6
Munjal (Google)
https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode157 chrome/browser/extensions/api/cast_channel/cast_socket.cc:157: void CastSocket::Connect(const net::CompletionCallback& callback) { On 2013/11/21 22:44:11, Munjal ...
7 years, 1 month ago (2013-11-21 22:53:35 UTC) #7
Munjal (Google)
https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/230001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode157 chrome/browser/extensions/api/cast_channel/cast_socket.cc:157: void CastSocket::Connect(const net::CompletionCallback& callback) { On 2013/11/21 22:53:36, Munjal ...
7 years, 1 month ago (2013-11-21 22:56:47 UTC) #8
Wez
Can you re-upload the patch? Latest one seems to be broken on Rietveld.
7 years, 1 month ago (2013-11-22 00:23:32 UTC) #9
Munjal (Google)
Wez, I uploaded the patch again. Let me know if it works now (I checked ...
7 years ago (2013-11-25 17:45:18 UTC) #10
Wez
https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode160 chrome/browser/extensions/api/cast_channel/cast_socket.cc:160: // Post a task so that we can safely ...
7 years ago (2013-11-26 02:45:56 UTC) #11
Munjal (Google)
https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode160 chrome/browser/extensions/api/cast_channel/cast_socket.cc:160: // Post a task so that we can safely ...
7 years ago (2013-11-26 20:06:14 UTC) #12
Wez
https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode160 chrome/browser/extensions/api/cast_channel/cast_socket.cc:160: // Post a task so that we can safely ...
7 years ago (2013-11-27 04:15:18 UTC) #13
Munjal (Google)
Adding mfoltz as reviewer https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/330001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode160 chrome/browser/extensions/api/cast_channel/cast_socket.cc:160: // Post a task so ...
7 years ago (2013-12-02 19:22:08 UTC) #14
mark a. foltz
Looks good as far as factoring out the state machines for read and write. Mostly ...
7 years ago (2013-12-03 00:55:59 UTC) #15
Munjal (Google)
https://codereview.chromium.org/79673003/diff/370001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/370001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode275 chrome/browser/extensions/api/cast_channel/cast_socket.cc:275: // Post a task to send a challenge message ...
7 years ago (2013-12-03 18:10:57 UTC) #16
Munjal (Google)
Ih av e uploaded another patch. Please take alook. Comments about various discussions: - There ...
7 years ago (2013-12-05 19:30:00 UTC) #17
Munjal (Google)
I mis-spoke a bit in my last message. I chose an approahc where we never ...
7 years ago (2013-12-05 23:30:45 UTC) #18
mark a. foltz
Looks good other than a few comments. After the changes we discussed offline, needs unit ...
7 years ago (2013-12-05 23:42:49 UTC) #19
mark a. foltz
undo LGTM Sigh...
7 years ago (2013-12-05 23:43:23 UTC) #20
mark a. foltz
not LGTM
7 years ago (2013-12-05 23:45:26 UTC) #21
Munjal (Google)
Done. I am workingo n unit tests. https://codereview.chromium.org/79673003/diff/470001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/470001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode241 chrome/browser/extensions/api/cast_channel/cast_socket.cc:241: //// bool ...
7 years ago (2013-12-06 19:20:21 UTC) #22
Ryan Sleevi
https://codereview.chromium.org/79673003/diff/510001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/510001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode172 chrome/browser/extensions/api/cast_channel/cast_socket.cc:172: DoConnectLoop(net::OK); DESIGN nit: the net/ idiom is as follows ...
7 years ago (2013-12-11 08:14:13 UTC) #23
Munjal (Google)
https://codereview.chromium.org/79673003/diff/510001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/510001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode172 chrome/browser/extensions/api/cast_channel/cast_socket.cc:172: DoConnectLoop(net::OK); On 2013/12/11 08:14:14, Ryan Sleevi wrote: > DESIGN ...
7 years ago (2013-12-11 23:39:39 UTC) #24
Munjal (Google)
Unit tests refactoring is also done now and the patch is fully ready for final ...
7 years ago (2013-12-11 23:42:24 UTC) #25
Ryan Sleevi
It's definitely going to take me a while to read through your unit tests. They're ...
7 years ago (2013-12-12 00:48:13 UTC) #26
Munjal (Google)
https://codereview.chromium.org/79673003/diff/510001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/510001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode175 chrome/browser/extensions/api/cast_channel/cast_socket.cc:175: void CastSocket::PostTaskToStartConnectLoop(int result) { On 2013/12/12 00:48:14, Ryan Sleevi ...
7 years ago (2013-12-12 17:53:46 UTC) #27
mark a. foltz
Tests look good overall. It looks like the read and write tests in particular share ...
7 years ago (2013-12-13 01:02:02 UTC) #28
Munjal (Google)
PTAL. I have factored out most of the duplicate code from tests into helpers. Like ...
7 years ago (2013-12-14 00:33:41 UTC) #29
Munjal (Google)
Mark, can you take another look?
7 years ago (2013-12-17 19:11:54 UTC) #30
mark a. foltz
On 2013/12/17 19:11:54, Munjal (Google) wrote: > Mark, can you take another look? LGTM ! ...
7 years ago (2013-12-17 23:30:49 UTC) #31
mark a. foltz
https://codereview.chromium.org/79673003/diff/720001/chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc File chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/79673003/diff/720001/chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc#newcode45 chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc:45: static void CreateStringMessage(MessageInfo* msg, Nit: please name parameters consistently ...
7 years ago (2013-12-17 23:31:03 UTC) #32
Munjal (Google)
https://codereview.chromium.org/79673003/diff/720001/chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc File chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/79673003/diff/720001/chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc#newcode45 chrome/browser/extensions/api/cast_channel/cast_socket_unittest.cc:45: static void CreateStringMessage(MessageInfo* msg, On 2013/12/17 23:31:03, mark a. ...
7 years ago (2013-12-17 23:40:25 UTC) #33
Ryan Sleevi
https://codereview.chromium.org/79673003/diff/750001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/750001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode65 chrome/browser/extensions/api/cast_channel/cast_socket.cc:65: const uint32 kMessageHeaderSize = sizeof(uint32); Why would you take ...
7 years ago (2013-12-18 00:02:13 UTC) #34
Wez
On 2013/12/18 00:02:13, Ryan Sleevi wrote: > https://codereview.chromium.org/79673003/diff/750001/chrome/browser/extensions/api/cast_channel/cast_socket.cc > File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): > > https://codereview.chromium.org/79673003/diff/750001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode65 ...
7 years ago (2013-12-18 00:48:44 UTC) #35
Ryan Sleevi
On 2013/12/18 00:48:44, Wez wrote: > On 2013/12/18 00:02:13, Ryan Sleevi wrote: > > > ...
7 years ago (2013-12-18 01:10:20 UTC) #36
Munjal (Google)
https://codereview.chromium.org/79673003/diff/750001/chrome/browser/extensions/api/cast_channel/cast_socket.cc File chrome/browser/extensions/api/cast_channel/cast_socket.cc (right): https://codereview.chromium.org/79673003/diff/750001/chrome/browser/extensions/api/cast_channel/cast_socket.cc#newcode65 chrome/browser/extensions/api/cast_channel/cast_socket.cc:65: const uint32 kMessageHeaderSize = sizeof(uint32); On 2013/12/18 00:02:13, Ryan ...
7 years ago (2013-12-19 18:20:20 UTC) #37
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years ago (2013-12-19 18:28:49 UTC) #38
Wez
Rubber-stamp LGTM based on mfoltz approval.
7 years ago (2013-12-19 22:42:42 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/munjal@chromium.org/79673003/750001
7 years ago (2013-12-19 22:51:19 UTC) #40
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=238724
7 years ago (2013-12-20 00:35:19 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/munjal@chromium.org/79673003/750001
7 years ago (2013-12-20 18:39:51 UTC) #42
commit-bot: I haz the power
7 years ago (2013-12-20 20:14:32 UTC) #43
Message was sent while issue was closed.
Change committed as 242158

Powered by Google App Engine
This is Rietveld 408576698