Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(8)

Issue 2837363002: [Media Router] Use DialMediaSinkService in MediaRouterMojoImpl (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 months, 3 weeks ago by zhaobin
Modified:
4 months, 3 weeks ago
CC:
Aaron Boodman, abarth-chromium, chfremer+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), extensions-reviews_chromium.org, feature-media-reviews_chromium.org, media-router+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media Router] Use DialMediaSinkServiceDelegate in MediaRouterMojoImpl - Added DialMediaSinkServiceDelegate to handle thread hopping between IO/UI thread - Added MediaRouterMojoImpl::StartDiscovery() TODO: - Call StartDiscovery() in MediaRouterMojoImpl::RegisterMediaRouteProvider() BUG=687375 Review-Url: https://codereview.chromium.org/2837363002 Cr-Commit-Position: refs/heads/master@{#475230} Committed: https://chromium.googlesource.com/chromium/src/+/ff8d8838d10847c5c41b7e7bc6ee488ccebbcda2

Patch Set 1 #

Total comments: 8

Patch Set 2 : rebase with upstream patch #

Patch Set 3 : resolve code review comments from Mark #

Total comments: 20

Patch Set 4 : resolve code review comments from Mark #

Total comments: 42

Patch Set 5 : resolve code review comments from Kevin #

Total comments: 15

Patch Set 6 : resolve code review comments from Kevin #

Patch Set 7 : merge with master #

Patch Set 8 : fix windows unit tests failures #

Total comments: 20

Patch Set 9 : add dial_media_sink_service_delegate #

Total comments: 32

Patch Set 10 : rebase with master #

Patch Set 11 : resolve code review comments from Mark #

Patch Set 12 : resolve code review comments from Mark #

Total comments: 19

Patch Set 13 : resolve code review comments from Kevin #

Patch Set 14 : resolve code review comments from Kevin #

Total comments: 6

Patch Set 15 : resolve code review comments from Mark #

Patch Set 16 : rebase with master #

Total comments: 6

Patch Set 17 : resolve code review comments from Mark #

Patch Set 18 : fix android compile error #

Total comments: 12

Patch Set 19 : resolve code review comments from Kevin #

Total comments: 6

Patch Set 20 : resolve code review comments from Kevin #

Total comments: 16

Patch Set 21 : resolve code review comments from Derek #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -67 lines) Patch
M chrome/browser/media/android/router/media_router_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/android/router/media_router_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/media/router/discovery/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +7 lines, -14 lines 0 comments Download
M chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +23 lines, -27 lines 0 comments Download
A chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +85 lines, -0 lines 0 comments Download
A chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +78 lines, -0 lines 0 comments Download
A chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +94 lines, -0 lines 0 comments Download
M chrome/browser/media/router/discovery/media_sink_service_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/media/router/discovery/media_sink_service_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/media/router/media_router.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/router/media_router_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/media/router/mock_media_router.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +14 lines, -4 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +32 lines, -8 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_test.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_test.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/media_router/discovery/media_sink_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
Commit queue not available (can’t edit this change).

Messages

Total messages: 79 (42 generated)
zhaobin
5 months, 3 weeks ago (2017-04-25 19:25:45 UTC) #2
mark a. foltz
Overall looks good, a couple of comments https://codereview.chromium.org/2837363002/diff/1/chrome/browser/media/router/mojo/media_router_mojo_impl.cc File chrome/browser/media/router/mojo/media_router_mojo_impl.cc (right): https://codereview.chromium.org/2837363002/diff/1/chrome/browser/media/router/mojo/media_router_mojo_impl.cc#newcode54 chrome/browser/media/router/mojo/media_router_mojo_impl.cc:54: "EnableBrowserSideDiscovery", base::FEATURE_DISABLED_BY_DEFAULT}; ...
5 months, 3 weeks ago (2017-04-26 23:52:56 UTC) #3
mark a. foltz
Looks good overall - a few comments. Please update description when you get a chance ...
5 months, 2 weeks ago (2017-05-01 20:32:57 UTC) #4
zhaobin
Make DialMediaSinkService RefCountedThreadSafe and handle post tasks between IO/UI thread. https://codereview.chromium.org/2837363002/diff/1/chrome/browser/media/router/mojo/media_router_mojo_impl.cc File chrome/browser/media/router/mojo/media_router_mojo_impl.cc (right): https://codereview.chromium.org/2837363002/diff/1/chrome/browser/media/router/mojo/media_router_mojo_impl.cc#newcode54 ...
5 months, 2 weeks ago (2017-05-03 01:54:00 UTC) #5
imcheng
+kmarshall to review. Thanks Kevin!
5 months, 2 weeks ago (2017-05-03 18:02:11 UTC) #8
Kevin M
https://codereview.chromium.org/2837363002/diff/60001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc (right): https://codereview.chromium.org/2837363002/diff/60001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc#newcode76 chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc:76: auto sinks = current_sinks_; Can you just work with ...
5 months, 2 weeks ago (2017-05-03 21:07:28 UTC) #9
zhaobin
https://codereview.chromium.org/2837363002/diff/60001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc (right): https://codereview.chromium.org/2837363002/diff/60001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc#newcode76 chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc:76: auto sinks = current_sinks_; On 2017/05/03 21:07:27, Kevin M ...
5 months, 2 weeks ago (2017-05-04 23:52:36 UTC) #10
Kevin M
https://codereview.chromium.org/2837363002/diff/80001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc (right): https://codereview.chromium.org/2837363002/diff/80001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc#newcode25 chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc:25: dial_registry_(nullptr), Suggestion: use inline setters in header file. dial_registry_ ...
5 months, 1 week ago (2017-05-08 18:22:19 UTC) #11
Kevin M
Getting close, these are mostly nits :)
5 months, 1 week ago (2017-05-08 18:26:21 UTC) #12
mark a. foltz
https://codereview.chromium.org/2837363002/diff/80001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc (right): https://codereview.chromium.org/2837363002/diff/80001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc#newcode90 chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc:90: new base::MockTimer(true /*retain_user_task*/, false /*is_repeating*/); On 2017/05/08 at 18:22:19, ...
5 months, 1 week ago (2017-05-08 18:29:02 UTC) #13
zhaobin
https://codereview.chromium.org/2837363002/diff/80001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc (right): https://codereview.chromium.org/2837363002/diff/80001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc#newcode25 chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc:25: dial_registry_(nullptr), On 2017/05/08 18:22:19, Kevin M wrote: > Suggestion: ...
5 months, 1 week ago (2017-05-08 20:13:48 UTC) #15
Kevin M
https://codereview.chromium.org/2837363002/diff/140001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc (right): https://codereview.chromium.org/2837363002/diff/140001/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc#newcode85 chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc:85: if (!dial_registry_) Assuming the service was Start()ed, then is ...
5 months, 1 week ago (2017-05-09 17:32:06 UTC) #27
mark a. foltz
It looks like the threading was redesigned in DialMediaSinkService and some threading issues have cropped ...
5 months, 1 week ago (2017-05-09 18:21:13 UTC) #28
zhaobin
Resolved dial_media_sink_service related comments in a seperate patch. Added dial_media_sink_service_delegate to handle thread hopping between ...
5 months, 1 week ago (2017-05-10 18:17:35 UTC) #31
mark a. foltz
LGTM with minor comments addressed. I did have one comment on the object design, although ...
5 months, 1 week ago (2017-05-12 21:37:38 UTC) #33
zhaobin
Will refactor object design in another patch and update this patch later. https://codereview.chromium.org/2837363002/diff/200001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_delegate.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_delegate.cc ...
5 months, 1 week ago (2017-05-12 23:03:39 UTC) #34
Kevin M
https://codereview.chromium.org/2837363002/diff/260001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/260001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode16 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:16: : MediaSinkService(callback) { This is what I was referring ...
5 months ago (2017-05-15 19:56:59 UTC) #35
mark a. foltz
+1 for simplifying the proxy implementation to post tasks directly using the DialMediaSinkService object, versus ...
5 months ago (2017-05-15 21:36:28 UTC) #36
zhaobin
https://codereview.chromium.org/2837363002/diff/260001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/260001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode16 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:16: : MediaSinkService(callback) { On 2017/05/15 19:56:58, Kevin M wrote: ...
5 months ago (2017-05-16 21:26:50 UTC) #37
zhaobin
- Changed threading a bit: MediaSinkMojoImpl (mojoImpl) lives on UI thread; DialMediaSinkService (serviceImpl) lives on ...
5 months ago (2017-05-17 02:02:08 UTC) #38
mark a. foltz
https://codereview.chromium.org/2837363002/diff/300001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/300001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode36 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:36: Do you need to reset |sink_discovery_callback_| here? https://codereview.chromium.org/2837363002/diff/300001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode53 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:53: ...
5 months ago (2017-05-17 18:16:20 UTC) #39
zhaobin
https://codereview.chromium.org/2837363002/diff/300001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/300001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode36 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:36: On 2017/05/17 18:16:20, mark a. foltz wrote: > Do ...
5 months ago (2017-05-17 22:36:48 UTC) #40
mark a. foltz
LGTM % a couple of minor comments. Nice patch :) https://codereview.chromium.org/2837363002/diff/340001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/340001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode76 ...
5 months ago (2017-05-19 18:56:57 UTC) #45
zhaobin
https://codereview.chromium.org/2837363002/diff/340001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/340001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode76 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:76: std::vector<MediaSinkInternal>(sinks.begin(), sinks.end()))); On 2017/05/19 18:56:57, mark a. foltz wrote: ...
4 months, 4 weeks ago (2017-05-22 20:21:31 UTC) #46
Kevin M
Getting close! One major potential segfaulting issue then it's basically down to nits. https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc File ...
4 months, 3 weeks ago (2017-05-24 00:52:56 UTC) #55
zhaobin
https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc (right): https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc#newcode48 chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc:48: finish_timer_.reset(); On 2017/05/24 00:52:55, Kevin M wrote: > This ...
4 months, 3 weeks ago (2017-05-24 17:45:52 UTC) #56
Kevin M
https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc (right): https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc#newcode48 chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc:48: finish_timer_.reset(); On 2017/05/24 17:45:51, zhaobin wrote: > On 2017/05/24 ...
4 months, 3 weeks ago (2017-05-24 18:13:29 UTC) #57
zhaobin
https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc (right): https://codereview.chromium.org/2837363002/diff/380001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc#newcode48 chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc:48: finish_timer_.reset(); On 2017/05/24 18:13:29, Kevin M wrote: > On ...
4 months, 3 weeks ago (2017-05-25 21:27:07 UTC) #58
Kevin M
lgtm Looks good, thanks Bin!
4 months, 3 weeks ago (2017-05-25 23:10:37 UTC) #61
Kevin M
lgtm Looks good, thanks Bin!
4 months, 3 weeks ago (2017-05-25 23:10:39 UTC) #62
imcheng
lgtm. Nice patch! I have a few questions regarding the use of std::move / memory ...
4 months, 3 weeks ago (2017-05-26 01:26:00 UTC) #65
mark a. foltz
re: std::move base::Callback now supports rvalue parameters. Since the sink list is simply being passed ...
4 months, 3 weeks ago (2017-05-26 16:24:16 UTC) #66
imcheng
On 2017/05/26 16:24:16, mark a. foltz wrote: > re: std::move > > base::Callback now supports ...
4 months, 3 weeks ago (2017-05-26 18:58:29 UTC) #67
mark a. foltz
On 2017/05/26 at 18:58:29, imcheng wrote: > On 2017/05/26 16:24:16, mark a. foltz wrote: > ...
4 months, 3 weeks ago (2017-05-26 20:13:21 UTC) #68
zhaobin
https://codereview.chromium.org/2837363002/diff/410001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc File chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc (right): https://codereview.chromium.org/2837363002/diff/410001/chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc#newcode50 chrome/browser/media/router/discovery/dial/dial_media_sink_service_proxy.cc:50: if (!dial_media_sink_service_) { On 2017/05/26 01:25:59, imcheng wrote: > ...
4 months, 3 weeks ago (2017-05-26 20:59:40 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2837363002/430001
4 months, 3 weeks ago (2017-05-27 03:07:14 UTC) #76
commit-bot: I haz the power
4 months, 3 weeks ago (2017-05-27 03:13:03 UTC) #79
Message was sent while issue was closed.
Committed patchset #21 (id:430001) as
https://chromium.googlesource.com/chromium/src/+/ff8d8838d10847c5c41b7e7bc6ee...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 81bcdb8aa