New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 698940 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Feature



Sign in to add a comment

[Cast] Implement sink querying in CastMediaSinkService

Project Member Reported by imch...@chromium.org, Mar 7 2017

Issue description

Implement logic to answer sink queries in CastMediaSinkService.

It should answer sink queries for the following sources:
- Mirroring URNs
- Cast URLs

Queries to Cast sinks are implemented using GET_APP_AVAILABILITY requests. CastMediaSinkService will need to intercept the responses and handle them in the browser, using the results to answer sink queries.

A special note is that the Cast SDK uses a sink query with a special Cast URL to implement a "broadcast" to pre-load apps on devices. The message sent to the devices in this case is slightly different. We can also port the broadcast messaging logic to the browser.
 

Comment 1 by mfo...@chromium.org, Oct 26 2017

Cc: -zhaobin@chromium.org
Labels: M-64
Owner: zhaobin@chromium.org
Status: Assigned (was: Available)

Comment 2 by mfo...@chromium.org, Oct 26 2017

Components: Internals>Cast

Comment 3 by mfo...@chromium.org, Oct 26 2017

Components: -Blink>PresentationAPI
Cc: zhaobin@chromium.org
Labels: -M-64 M-65
Owner: imch...@chromium.org
I am still working on a prototype but got caught up with other things, so this is probably going into M65.

Comment 5 by mfo...@chromium.org, Dec 14 2017

Labels: -Type-Bug Type-Feature
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217

commit 6ad45bcd758ad6eaba1da3a71b909f7ca7b46217
Author: Derek Cheng <imcheng@chromium.org>
Date: Fri Dec 29 01:31:57 2017

[Media Router] DualMediaSinkService Singleton.

- Dial/CastMediaSinkService are now singletons. Previously they depended
on the BrowserContext for its URLRequestContextGetter. This patch
changes it so that the system URLRequestContextGetter from
g_browser_process is used. Note that they are technically singletons
by virtue of being owned by DualMediaSinkService; no API currently
exists to access the singleton Dial/CastMediaSinkService instance.
- Simplified thread hopping for the callbacks passed into the public
Start API.
- Wrap Dial/CastMediaSinkService in a DualMediaSinkService. It also
encapsulates the management of the 2 services and in-browser cast
discovery feature logic, which used to be in MediaRouterDesktop. Note
DualMediaSinkService itself is also a singleton. The class is located
in c/b/m/r/providers/cast. (Further movings TBD in future patches)
- This pattern will be helpful when we move DualMediaSinkService into
a in-browser Cast MRP implementation.
- DualMediaSinkService has 2 public APIs, both exist solely for
providing extension with in-browser discovered sinks:
-- current_sinks() - replaces ForceSinkDiscoveryCallback() for syncing
sinks to the extension.
-- AddSinksDiscoveredCallback() - get notified for sink updates

BUG= 698940 

Change-Id: I3e754305c17ef2937af1eca30ba70a8baa783a3b
Reviewed-on: https://chromium-review.googlesource.com/821490
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526348}
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/dial/dial_media_sink_service.h
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/mojo/media_router_desktop.h
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/mojo/media_router_desktop_unittest.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/mojo/media_router_mojo_test.cc
[add] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[add] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[add] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/providers/cast/dual_media_sink_service_unittest.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/test_helper.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/browser/media/router/test_helper.h
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/common/media_router/discovery/media_sink_service_base.cc
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/common/media_router/discovery/media_sink_service_base.h
[modify] https://crrev.com/6ad45bcd758ad6eaba1da3a71b909f7ca7b46217/chrome/test/BUILD.gn

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/74678ded92bc2672fbc6fa772c100a155fdfa904

commit 74678ded92bc2672fbc6fa772c100a155fdfa904
Author: Derek Cheng <imcheng@chromium.org>
Date: Fri Jan 05 01:49:46 2018

[Cast channel] Cast channel message util cleanup.

Move the static / anonymous functions related to cast channel messages
from keep_alive_delegate.{h,cc} to cast_message_util.{h,cc}.

Cleaned up the API to generate keep alive message:
- Take a enum value instead of a const char* (which must be one of two
  constants).
- The source_id of the message is now "sender-0", the same as that of
  auth challenge message, the other kind of "platform message"
  currently sent from browser. This should have no visible behavior
  changes.

For in-browser Cast MRP we will define additional functions to
format/parse other types of cast messages in cast_message_util.{h,cc}

Bug:  698940 
Change-Id: I7ef55f1d4f6e1879e4b63a372090519f36d2d547
Reviewed-on: https://chromium-review.googlesource.com/843659
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527185}
[modify] https://crrev.com/74678ded92bc2672fbc6fa772c100a155fdfa904/components/cast_channel/cast_message_util.cc
[modify] https://crrev.com/74678ded92bc2672fbc6fa772c100a155fdfa904/components/cast_channel/cast_message_util.h
[modify] https://crrev.com/74678ded92bc2672fbc6fa772c100a155fdfa904/components/cast_channel/keep_alive_delegate.cc
[modify] https://crrev.com/74678ded92bc2672fbc6fa772c100a155fdfa904/components/cast_channel/keep_alive_delegate.h
[modify] https://crrev.com/74678ded92bc2672fbc6fa772c100a155fdfa904/components/cast_channel/keep_alive_delegate_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6a28c49238f30bc180b265ec7432d5f4bd3d18f5

commit 6a28c49238f30bc180b265ec7432d5f4bd3d18f5
Author: Derek Cheng <imcheng@chromium.org>
Date: Thu Jan 18 10:20:01 2018

[Media Router] Cast sink queries part 1.

This patch defines some utility methods that will be used in subsequent
patches:

cast_message_util:
- virtual connection and app availability requests
- parse additional namespaces

media_source_helper:
- helper method for legacy cast urls

cast_socket:
- added missing enum value in CastDeviceCapability

Bug:  698940 
Change-Id: Ie5fef9ca522ffb9375183dafb72e3209fd0fa5c6
Reviewed-on: https://chromium-review.googlesource.com/869951
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Bin Zhao <zhaobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530108}
[modify] https://crrev.com/6a28c49238f30bc180b265ec7432d5f4bd3d18f5/chrome/common/media_router/media_source_helper.cc
[modify] https://crrev.com/6a28c49238f30bc180b265ec7432d5f4bd3d18f5/chrome/common/media_router/media_source_helper.h
[modify] https://crrev.com/6a28c49238f30bc180b265ec7432d5f4bd3d18f5/components/cast_channel/cast_message_util.cc
[modify] https://crrev.com/6a28c49238f30bc180b265ec7432d5f4bd3d18f5/components/cast_channel/cast_message_util.h
[modify] https://crrev.com/6a28c49238f30bc180b265ec7432d5f4bd3d18f5/components/cast_channel/cast_socket.h

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/329ac9a72122cb5c0449bd33f836783f1a8a5481

commit 329ac9a72122cb5c0449bd33f836783f1a8a5481
Author: Derek Cheng <imcheng@chromium.org>
Date: Wed Jan 24 03:50:22 2018

[Media Router] Cast sink query part 2.

Add CastMediaSource and related structs to parse MediaSource into
a structured format. This will be used in a subsequent patch.

Change-Id: Ia49b5c2fd45b1e9a992f410b170433365d678a96
Bug:  698940 
Reviewed-on: https://chromium-review.googlesource.com/869732
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531423}
[modify] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/BUILD.gn
[modify] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/media_source_helper.cc
[modify] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/media_source_helper.h
[modify] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/media_source_helper_unittest.cc
[add] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/providers/cast/DEPS
[add] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/providers/cast/cast_media_source.cc
[add] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/providers/cast/cast_media_source.h
[add] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/common/media_router/providers/cast/cast_media_source_unittest.cc
[modify] https://crrev.com/329ac9a72122cb5c0449bd33f836783f1a8a5481/chrome/test/BUILD.gn

Labels: -M-65 M-66
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96a4365e9a6c6d3a58112d434fcdb860fe42dc93

commit 96a4365e9a6c6d3a58112d434fcdb860fe42dc93
Author: Derek Cheng <imcheng@chromium.org>
Date: Wed Jan 31 21:49:46 2018

[Media Router] Cast sink query part 2b.

This patch adds CastMessageHandler, a class that uses CastSocket to send
messages to Cast devices. It is also responsible for virtual connection
management, making VCs transparent to the user. The class currently
supports sending app availability requests and handling the response.
In the future, the class will be expanded to support message
subscription.

Bug:  698940 
Change-Id: I8a54b8cd0fa2577d882f7e1084bb3de9c49a4724
Reviewed-on: https://chromium-review.googlesource.com/872151
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533426}
[modify] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/BUILD.gn
[add] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/cast_message_handler.cc
[add] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/cast_message_handler.h
[add] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/cast_message_handler_unittest.cc
[modify] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/cast_message_util.cc
[modify] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/cast_message_util.h
[modify] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/components/cast_channel/cast_socket_service.h
[modify] https://crrev.com/96a4365e9a6c6d3a58112d434fcdb860fe42dc93/tools/traffic_annotation/summary/annotations.xml

Project Member

Comment 12 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df68543c0d9b9407ff82d5e3ad360fdb46de68fb

commit df68543c0d9b9407ff82d5e3ad360fdb46de68fb
Author: Derek Cheng <imcheng@chromium.org>
Date: Fri Feb 09 00:56:50 2018

[Media Router] Eagerly initialize DualMediaSinkService with MRDesktop.

DualMediaSinkService should be instantiated along with MRDesktop to
start discovery. In subsequent sink query patches, we will also need
to use it to initialize in-browser DIAL / Cast MRPs.

This behavior causes some unit tests and browser tests to fail.

For the former, it is mostly because they were not using the mock
version of MediaRouter consistently, so this patch fixes that.

For browser tests, MediaRouterDesktop, and therefore DualMSS, are
instantiated during test setup. The extension API tests fail because
they assume the test is run in an isolated environment (i.e. no outer
devices) and that they are the only DIAL / mDNS observers. Because
we don't want actual discovery to run in those tests, a no-op version
of DualMSS is introduced and set as the instance before the browser
test setup.

Bug:  698940 , 779892 
Change-Id: Iea7467c430fa78944f802dcd15964483c65e674b
Reviewed-on: https://chromium-review.googlesource.com/907640
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Gene Gutnik <gene@chromium.org>
Reviewed-by: Bin Zhao <zhaobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535599}
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/extensions/api/dial/dial_apitest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/media_router_factory_unittest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/presentation/presentation_service_delegate_impl.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/presentation/presentation_service_delegate_impl.h
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/presentation/presentation_service_delegate_impl_unittest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[add] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/test/noop_dual_media_sink_service.cc
[add] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/media/router/test/noop_dual_media_sink_service.h
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/webui/media_router/media_router_ui.h
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/webui/media_router/media_router_ui_service_factory_unittest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/chrome/browser/ui/webui/media_router/media_router_web_ui_test.cc
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/extensions/browser/api/cast_channel/DEPS
[modify] https://crrev.com/df68543c0d9b9407ff82d5e3ad360fdb46de68fb/extensions/browser/api/cast_channel/cast_channel_apitest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/145e34dec303fd240e4d8bb0592ba57043d69b36

commit 145e34dec303fd240e4d8bb0592ba57043d69b36
Author: Olga Sharonova <olka@chromium.org>
Date: Fri Feb 09 09:06:52 2018

Revert "[Media Router] Eagerly initialize DualMediaSinkService with MRDesktop."

This reverts commit df68543c0d9b9407ff82d5e3ad360fdb46de68fb.

Reason for revert: suspected cause of  Issue 810692 
Bug:  810692 

Original change's description:
> [Media Router] Eagerly initialize DualMediaSinkService with MRDesktop.
> 
> DualMediaSinkService should be instantiated along with MRDesktop to
> start discovery. In subsequent sink query patches, we will also need
> to use it to initialize in-browser DIAL / Cast MRPs.
> 
> This behavior causes some unit tests and browser tests to fail.
> 
> For the former, it is mostly because they were not using the mock
> version of MediaRouter consistently, so this patch fixes that.
> 
> For browser tests, MediaRouterDesktop, and therefore DualMSS, are
> instantiated during test setup. The extension API tests fail because
> they assume the test is run in an isolated environment (i.e. no outer
> devices) and that they are the only DIAL / mDNS observers. Because
> we don't want actual discovery to run in those tests, a no-op version
> of DualMSS is introduced and set as the instance before the browser
> test setup.
> 
> Bug:  698940 , 779892 
> Change-Id: Iea7467c430fa78944f802dcd15964483c65e674b
> Reviewed-on: https://chromium-review.googlesource.com/907640
> Commit-Queue: Derek Cheng <imcheng@chromium.org>
> Reviewed-by: Gene Gutnik <gene@chromium.org>
> Reviewed-by: Bin Zhao <zhaobin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#535599}

TBR=gene@chromium.org,imcheng@chromium.org,zhaobin@chromium.org

Change-Id: I1baf83954e6f5a838fc52ca95062a375d869b2cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  698940 ,  779892 
Reviewed-on: https://chromium-review.googlesource.com/910050
Reviewed-by: Olga Sharonova <olka@chromium.org>
Commit-Queue: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535672}
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/extensions/api/dial/dial_apitest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/media_router_factory_unittest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/presentation/presentation_service_delegate_impl.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/presentation/presentation_service_delegate_impl.h
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/presentation/presentation_service_delegate_impl_unittest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[delete] https://crrev.com/5641d755098b3e7cae73b2bb87fa16adc6580f69/chrome/browser/media/router/test/noop_dual_media_sink_service.cc
[delete] https://crrev.com/5641d755098b3e7cae73b2bb87fa16adc6580f69/chrome/browser/media/router/test/noop_dual_media_sink_service.h
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/webui/media_router/media_router_ui.h
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/webui/media_router/media_router_ui_service_factory_unittest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/chrome/browser/ui/webui/media_router/media_router_web_ui_test.cc
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/extensions/browser/api/cast_channel/DEPS
[modify] https://crrev.com/145e34dec303fd240e4d8bb0592ba57043d69b36/extensions/browser/api/cast_channel/cast_channel_apitest.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Feb 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd6b757d953001eae759c4786b5afe9c7e00916f

commit cd6b757d953001eae759c4786b5afe9c7e00916f
Author: Derek Cheng <imcheng@chromium.org>
Date: Wed Feb 21 20:15:23 2018

[Media Router] Fix URLRequestContext leak and race condition.

Remove usage of SystemURLRequestContextGetter which has led to several
issues including shutdown leak and test setup problems. This means 2
things:
- No more NetLog for DIAL and Cast sockets (for now. When we switch to
NetworkService we can reconsider adding back support depending on
our needs)
- DIAL device description / app info fetch now replaced with URLLoader
APIs that's part of network service.

The race condition issue caused by calling CMSSImpl::GetWeakPtr on two
different sequence is fixed by not using a WeakPtr by assuming
CMSSImpl outlives DialMSSImpl, which is true due to their ordering in
DualMediaSinkService. Also removed the PostTask trampoline by assuming
they both run on the same sequence.

Bug:  810676 , 805728 , 698940 , 779892 , 811226 
Change-Id: Ib3ebb4f7f9d3690c952d2ddcbd579bb5d876906e
Reviewed-on: https://chromium-review.googlesource.com/912561
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Bin Zhao <zhaobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538195}
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/extensions/api/dial/dial_api.cc
[add] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/DEPS
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/device_description_fetcher.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/device_description_fetcher.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/device_description_fetcher_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/device_description_service.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/device_description_service.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_app_discovery_service.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_app_discovery_service.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_app_discovery_service_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_app_info_fetcher.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_app_info_fetcher.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_app_info_fetcher_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_media_sink_service.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/mojo/media_router_desktop_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/providers/cast/dual_media_sink_service_unittest.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/test/test_helper.cc
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/browser/media/router/test/test_helper.h
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/chrome/test/BUILD.gn
[modify] https://crrev.com/cd6b757d953001eae759c4786b5afe9c7e00916f/components/cast_channel/cast_socket.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554

commit ea1cbe27ced63d2d6aa72cc95db460fb06a9f554
Author: Derek Cheng <imcheng@chromium.org>
Date: Thu Feb 22 18:24:33 2018

[Reland][Media Router] Eagerly initialize DualMSS with MRDesktop.

The patch was previously reverted in 910050 due to leaking system
URLRequestContext. This issue has been fixed with 912561 and this patch
is ready to be relanded.


TBR=gene@chromium.org

Bug:  698940 , 779892 
Change-Id: Ib67ffdc8cf6fe1504bdad95ecdf9f51face030a9
Reviewed-on: https://chromium-review.googlesource.com/929864
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538491}
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/extensions/api/dial/dial_apitest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/media_router_factory_unittest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/presentation/presentation_service_delegate_impl.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/presentation/presentation_service_delegate_impl.h
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/presentation/presentation_service_delegate_impl_unittest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[add] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/test/noop_dual_media_sink_service.cc
[add] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/media/router/test/noop_dual_media_sink_service.h
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/webui/media_router/media_router_ui.h
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/webui/media_router/media_router_ui_service_factory_unittest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/chrome/browser/ui/webui/media_router/media_router_web_ui_test.cc
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/extensions/browser/api/cast_channel/DEPS
[modify] https://crrev.com/ea1cbe27ced63d2d6aa72cc95db460fb06a9f554/extensions/browser/api/cast_channel/cast_channel_apitest.cc

Remaining items to implement after https://chromium-review.googlesource.com/c/chromium/src/+/899954 lands:

- randomized delay for (multiple) app availability requests to a sink
- implement broadcast
- metrics
Project Member

Comment 17 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5493913a3cc87a361c7e4c84b8d141f42bf53a9

commit a5493913a3cc87a361c7e4c84b8d141f42bf53a9
Author: Derek Cheng <imcheng@chromium.org>
Date: Wed Mar 07 01:35:18 2018

[Media Router] Cast sink query part 3.

Add CastMediaRouteProvider, that interfaces with MediaRouter. It will
use CastAppDiscoveryService to handle sink queries. (Per profile). The
CastMediaRouteProvider runs on the IO thread, and thread hopping
between MediaRouterDesktop and CastMRP is done by Mojo.

Add CastAppDiscoveryService (singleton), which runs on the IO thread.
It observes sinks from CastMediaSinkService and requests app
availability via CastMessageHandler.


Bug:  698940 
Change-Id: I48c4d1287dcea1ab30e524d71ba7fd947725646a
Reviewed-on: https://chromium-review.googlesource.com/899954
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541271}
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/media_router_feature.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/media_router_feature.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/mojo/media_router_desktop.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/mojo/media_router_mojo_metrics.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/mojo/media_sink_service_status.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/mojo/media_sink_service_status_unittest.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.h
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_app_availability_tracker_unittest.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/cast_media_route_provider.h
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/chrome_cast_message_handler.cc
[add] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/chrome_cast_message_handler.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/test/test_helper.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/browser/media/router/test/test_helper.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/common/media_router/media_route_provider_helper.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/common/media_router/media_route_provider_helper.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/common/media_router/mojo/media_router.mojom
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/common/media_router/mojo/media_router_struct_traits.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/common/media_router/providers/cast/cast_media_source.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/common/media_router/providers/cast/cast_media_source.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/renderer/resources/extensions/media_router_bindings.js
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/chrome/test/BUILD.gn
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/components/cast_channel/cast_message_handler.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/components/cast_channel/cast_message_handler.h
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/components/cast_channel/cast_test_util.cc
[modify] https://crrev.com/a5493913a3cc87a361c7e4c84b8d141f42bf53a9/components/cast_channel/cast_test_util.h

Labels: Merge-Request-66
Project Member

Comment 19 by sheriffbot@chromium.org, Mar 8 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Before we approve merge to M66, could you pls confirm followings?

There are multiple cls are listed, which cl you're requesting a merge for?
Is this M66 regression and critical to merge?
Is the change well baked/verified in Canary, having enough automation tests coverage and safe to merge?
Any other imp details to justify the merge.

Hi govind@:

- For now, only requesting a merge to the patch in comment 17.
- This is not a regression, but this is a new feature (in-browser Cast sink query). Ideally, I would like to start testing this in dev/canary in M66.
- There should be sufficient test coverage. The feature is also off by default.
Thank you imcheng@. Is the feature behind Finch flag?
Yes. The feature is named CastMediaRouteProvider.
Labels: -Merge-Review-66 Merge-Approved-66
Approving merge to M66 branch 3359 based for cl listed at #17 based on comment #21 and #23. Please merge ASAP so we can pick it up for tomorrow's M66 dev release. Thank you.
Project Member

Comment 25 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17a5fde2e8ffd57a37f3c388b3a25095e4175798

commit 17a5fde2e8ffd57a37f3c388b3a25095e4175798
Author: Derek Cheng <imcheng@chromium.org>
Date: Fri Mar 09 02:17:49 2018

[Cast MRP] Add metrics for app availability success/failure.

This should match the metric that is currently recorded in the
extension.

Bug:  698940 
Change-Id: I2c1310a9b0911f4d610dfd5d8c74714ff8132913
Reviewed-on: https://chromium-review.googlesource.com/944719
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541994}
[modify] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[modify] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[add] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/browser/media/router/providers/cast/cast_media_route_provider_metrics.cc
[add] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/browser/media/router/providers/cast/cast_media_route_provider_metrics.h
[add] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/browser/media/router/providers/cast/cast_media_route_provider_metrics_unittest.cc
[modify] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/chrome/test/BUILD.gn
[modify] https://crrev.com/17a5fde2e8ffd57a37f3c388b3a25095e4175798/tools/metrics/histograms/histograms.xml

Pls merge your change to M66 branch ASAP so we can pick it up for next M66 Dev/Beta release. Thank you.
Project Member

Comment 27 by sheriffbot@chromium.org, Mar 12 2018

Cc: gov...@chromium.org
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 28 by bugdroid1@chromium.org, Mar 12 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b58c304af12a57843c0b2f667e1055b8331da081

commit b58c304af12a57843c0b2f667e1055b8331da081
Author: Derek Cheng <imcheng@chromium.org>
Date: Mon Mar 12 16:59:43 2018

[Media Router] Cast sink query part 3.

Add CastMediaRouteProvider, that interfaces with MediaRouter. It will
use CastAppDiscoveryService to handle sink queries. (Per profile). The
CastMediaRouteProvider runs on the IO thread, and thread hopping
between MediaRouterDesktop and CastMRP is done by Mojo.

Add CastAppDiscoveryService (singleton), which runs on the IO thread.
It observes sinks from CastMediaSinkService and requests app
availability via CastMessageHandler.


Bug:  698940 
Change-Id: I48c4d1287dcea1ab30e524d71ba7fd947725646a
Reviewed-on: https://chromium-review.googlesource.com/899954
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#541271}(cherry picked from commit a5493913a3cc87a361c7e4c84b8d141f42bf53a9)
Reviewed-on: https://chromium-review.googlesource.com/958013
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#164}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/media_router_feature.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/media_router_feature.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/mojo/media_router_desktop.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/mojo/media_router_mojo_metrics.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/mojo/media_sink_service_status.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/mojo/media_sink_service_status_unittest.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.h
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_app_availability_tracker_unittest.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/cast_media_route_provider.h
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/chrome_cast_message_handler.cc
[add] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/chrome_cast_message_handler.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/test/test_helper.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/browser/media/router/test/test_helper.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/common/media_router/media_route_provider_helper.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/common/media_router/media_route_provider_helper.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/common/media_router/mojo/media_router.mojom
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/common/media_router/mojo/media_router_struct_traits.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/common/media_router/providers/cast/cast_media_source.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/common/media_router/providers/cast/cast_media_source.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/renderer/resources/extensions/media_router_bindings.js
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/chrome/test/BUILD.gn
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/components/cast_channel/cast_message_handler.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/components/cast_channel/cast_message_handler.h
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/components/cast_channel/cast_test_util.cc
[modify] https://crrev.com/b58c304af12a57843c0b2f667e1055b8331da081/components/cast_channel/cast_test_util.h

Labels: -merge-merged-3359 Merge-Request-66
I would like to request another merge to 66, for the patch in Comment 25. This patch is a followup to record metrics related to the feature. Like the other patch, it is also behind a feature flag. Thanks.
Project Member

Comment 30 by sheriffbot@chromium.org, Mar 12 2018

Labels: -Merge-Request-66 Merge-Review-66
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-66 Merge-Approved-66
Approving merge for cl listed at #25 to M66 branch 3359 based on comment #29. Pls merge ASAP. Thank you.
Project Member

Comment 32 by bugdroid1@chromium.org, Mar 12 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6f4190d17ee5762b3f371d06967302b517c4900

commit b6f4190d17ee5762b3f371d06967302b517c4900
Author: Derek Cheng <imcheng@chromium.org>
Date: Mon Mar 12 22:07:06 2018

[Cast MRP] Add metrics for app availability success/failure.

This should match the metric that is currently recorded in the
extension.

Bug:  698940 
Change-Id: I2c1310a9b0911f4d610dfd5d8c74714ff8132913
Reviewed-on: https://chromium-review.googlesource.com/944719
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#541994}(cherry picked from commit 17a5fde2e8ffd57a37f3c388b3a25095e4175798)
Reviewed-on: https://chromium-review.googlesource.com/958987
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#181}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/browser/media/router/BUILD.gn
[modify] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[modify] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[add] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/browser/media/router/providers/cast/cast_media_route_provider_metrics.cc
[add] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/browser/media/router/providers/cast/cast_media_route_provider_metrics.h
[add] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/browser/media/router/providers/cast/cast_media_route_provider_metrics_unittest.cc
[modify] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/chrome/test/BUILD.gn
[modify] https://crrev.com/b6f4190d17ee5762b3f371d06967302b517c4900/tools/metrics/histograms/histograms.xml

Project Member

Comment 33 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf

commit 3a9afded0522ab0a846b0b9ac52b270a83bfb5cf
Author: Derek Cheng <imcheng@chromium.org>
Date: Tue Mar 13 00:10:59 2018

[Cast MRP] Fix icon type of sinks created by the browser.

Currently the icon type is always hard coded to CAST, but it should be
determined using the Cast device capabilities. This patch implements
that logic so that with the CastMediaRouteProvider feature enabled,
the right icon type will be displayed on the device list.

Note this does not impact the MR extension since it has its own logic
to determine icon type.

Bug:  698940 
Change-Id: I6afa8eb9db1553fabaf2a8ee617812edb354ae8c
Reviewed-on: https://chromium-review.googlesource.com/956538
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Bin Zhao <zhaobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542660}
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/media_router.h
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/test/mock_media_router.h
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/browser/media/router/test/test_helper.h
[modify] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/common/media_router/BUILD.gn
[add] https://crrev.com/3a9afded0522ab0a846b0b9ac52b270a83bfb5cf/chrome/common/media_router/discovery/DEPS

Project Member

Comment 34 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/915c692849b895b4a0ec8b3d31867b40c821c98f

commit 915c692849b895b4a0ec8b3d31867b40c821c98f
Author: Derek Cheng <imcheng@chromium.org>
Date: Thu Mar 15 17:59:56 2018

[CastMRP] Fix a couple of bugs in CMSSImpl.

- On channel error, erase the sink from |current_sinks_map|.
  crrev.com/541271 added a check in OpenChannel() to short circuit if
  a sink already exists on the map. In order for retry on error to kick
  in properly, we will need to erase the entry in OnError().
- In OnChannelOpenSucceeded, erase stale sink with the same IP. This is
  done to maintain the invariant of having at most 1 sink of a given ID
  in the map. Stale sink is defined as having the same sink ID but
  different IP endpoint than the current one.
- In OnChannelOpenFailed, when erasing the sink from
  |current_sinks_map_|, also verify the sink ID. It is possible that
  a different sink now occcupies the IP endpoint that it is trying to
  erase.

Change-Id: I12bfd5af5f664c4773e7587dc30c6709d2352021
Bug:  698940 
Reviewed-on: https://chromium-review.googlesource.com/961555
Reviewed-by: Bin Zhao <zhaobin@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543439}
[modify] https://crrev.com/915c692849b895b4a0ec8b3d31867b40c821c98f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/915c692849b895b4a0ec8b3d31867b40c821c98f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/915c692849b895b4a0ec8b3d31867b40c821c98f/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc

Labels: -merge-merged-3359 Merge-Request-66
Hi, I would like to request another merge, this time for the patch in #34. It contains bug fixes for Cast discovery where it fails to re-discover devices when reconnecting to a network. Thank you.
Project Member

Comment 36 by sheriffbot@chromium.org, Mar 16 2018

Labels: -Merge-Request-66 Merge-Review-66
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-66 Merge-Approved-66
Approving merge to M66. Branch:3359
Project Member

Comment 38 by bugdroid1@chromium.org, Mar 19 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d43c8b11d947ff3efb1028841c47a52a90b15a84

commit d43c8b11d947ff3efb1028841c47a52a90b15a84
Author: Derek Cheng <imcheng@chromium.org>
Date: Mon Mar 19 19:13:16 2018

[CastMRP] Fix a couple of bugs in CMSSImpl.

- On channel error, erase the sink from |current_sinks_map|.
  crrev.com/541271 added a check in OpenChannel() to short circuit if
  a sink already exists on the map. In order for retry on error to kick
  in properly, we will need to erase the entry in OnError().
- In OnChannelOpenSucceeded, erase stale sink with the same IP. This is
  done to maintain the invariant of having at most 1 sink of a given ID
  in the map. Stale sink is defined as having the same sink ID but
  different IP endpoint than the current one.
- In OnChannelOpenFailed, when erasing the sink from
  |current_sinks_map_|, also verify the sink ID. It is possible that
  a different sink now occcupies the IP endpoint that it is trying to
  erase.

Change-Id: I12bfd5af5f664c4773e7587dc30c6709d2352021
Bug:  698940 
Reviewed-on: https://chromium-review.googlesource.com/961555
Reviewed-by: Bin Zhao <zhaobin@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#543439}(cherry picked from commit 915c692849b895b4a0ec8b3d31867b40c821c98f)
Reviewed-on: https://chromium-review.googlesource.com/969284
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#320}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/d43c8b11d947ff3efb1028841c47a52a90b15a84/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/d43c8b11d947ff3efb1028841c47a52a90b15a84/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/d43c8b11d947ff3efb1028841c47a52a90b15a84/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc

Labels: -M-66 M-67

Comment 40 by amp@chromium.org, Mar 30 2018

Status: Fixed (was: Assigned)
Project Member

Comment 41 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44aa3c0da66423ec893d55cb1c3fae08a61d6f39

commit 44aa3c0da66423ec893d55cb1c3fae08a61d6f39
Author: Derek Cheng <imcheng@chromium.org>
Date: Wed Apr 25 18:12:29 2018

[Cast MRP] Add a flag to connect to (test) devices with fixed ip.

This flag is needed for the E2E tests to continue functioning as Cast
discovery is moved to the browser side.

The flag name is media-router-cast-device-ips, and the value is a
comma-separated list of IP endpoints of the Cast devices. The port
number can be omitted, and will default to 8009 in that case.

Bug:  698940 
Change-Id: I1cf9b4ebc7c63f53ed811002eb917af137e62b74
Reviewed-on: https://chromium-review.googlesource.com/1024237
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553659}
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/BUILD.gn
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[add] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/media_sink_util.cc
[add] https://crrev.com/44aa3c0da66423ec893d55cb1c3fae08a61d6f39/chrome/browser/media/router/discovery/mdns/media_sink_util.h

Project Member

Comment 42 by bugdroid1@chromium.org, Apr 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d98e23951b8a1253aab3e90fc5a3531cab88543

commit 4d98e23951b8a1253aab3e90fc5a3531cab88543
Author: Derek Cheng <imcheng@chromium.org>
Date: Thu Apr 26 18:34:47 2018

[Cast MRP] Force refresh app availability status on user gesture.

MRP::UpdateMediaSinks is used as a signal that user gesture occurred.
This patch implements UpdateMediaSinks on CastMRP. The app
availability statuses of currently registered (sink, appId) pairs will
be force refreshed, subject to a minimum time window of 3 minutes.

In addition to recording the app availability result, we will now also
record the time of result in order to implement aforementioned logic.


Bug:  698940 
Change-Id: I65e56a5466b0c70df46e674be5d8d2683c671449
Reviewed-on: https://chromium-review.googlesource.com/949097
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Adam Parker <amp@chromium.org>
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554095}
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_app_availability_tracker.h
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_app_availability_tracker_unittest.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/chrome/common/media_router/mojo/media_router.mojom
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/components/cast_channel/cast_message_util.cc
[modify] https://crrev.com/4d98e23951b8a1253aab3e90fc5a3531cab88543/components/cast_channel/cast_message_util.h

Project Member

Comment 43 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/064e46a24a66dc285b5118d84d4b228754b0500a

commit 064e46a24a66dc285b5118d84d4b228754b0500a
Author: Derek Cheng <imcheng@chromium.org>
Date: Thu May 03 20:16:56 2018

[Media Router] Clean up MediaSinkServiceBase.

MediaSinkServiceBase changes:

- Move the Observer interface currently in CMSSImpl to
MediaSinkServiceBase and generalizes it so it can be used for other
MediaSinkServiceBase implementations.
- Standardizes add/update/remove/get sink operations in
MediaSinkServiceBase.
Both of these make the code using MediaSinkServiceBase more testable as
additional code in MRP depend on them.

Also cleaned up logic related to the discovery timer by combining
Start/RestartTimer().

-----

DialMediaSinkSevice changes:
- DMSSImpl now pools sinks discovered in the latest round and is used
to merge with the |MSSBase::sinks_| when the discovery timer fires.
Before this patch, the current set is removed on the start of a discovery
round (because unlike Cast, there is no active connection to a device to
tell that it is still alive or gone), which makes the sink list unstable.
With this patch, the current set is only modified at the end of a discovery
round.
- TODOs in future patches:
-- move app discovery service out of DMSSImpl, similar to Cast.
-- get rid of DMSS and move UI thread dependencies (if any) into part
   of DMSSImpl. Then rename DMSSImpl -> DMSS.

-----

CastMediaSinkService changes;
- No longer keep track of sinks by ip endpoint. Instead uses
|MSSBase::sinks_| to maintain sink list.
- CastAppDiscoveryService no longer need to maintain its own map of
sinks, and instead uses |MSSBase::GetSinks()/GetSinkById()|.
- The callback used for dual disovery is converted to use
MediaSinkServiceBase::Observer.
- TODOs in future patches:
-- get rid of CMSS and move UI thread dependencies into CMSSImpl.
Rename CMSSImpl -> CMSS.
-----

Notes:
- The MediaRouteDesktop ProvideSinks callback is not converted to use
Observers. This is because the callback is expected to be temporary (until
we can turn off the extension MRPs), so we treat it as a special case.

Bug:  816628 , 698940 
Change-Id: I11fd13f7ebf743d78c9499ad24f98cf72f571ee5
Reviewed-on: https://chromium-review.googlesource.com/1033727
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555854}
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/dial/dial_media_sink_service.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/cast/dual_media_sink_service_unittest.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/dial/dial_media_route_provider.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/providers/dial/dial_media_route_provider_unittest.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/browser/media/router/test/test_helper.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/common/media_router/BUILD.gn
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/common/media_router/discovery/media_sink_service_base.cc
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/common/media_router/discovery/media_sink_service_base.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/common/media_router/discovery/media_sink_service_base_unittest.cc
[add] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/common/media_router/test/test_helper.cc
[add] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/common/media_router/test/test_helper.h
[modify] https://crrev.com/064e46a24a66dc285b5118d84d4b228754b0500a/chrome/test/BUILD.gn

Project Member

Comment 44 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a204023d46bc02634f1c6f164cae99d327d53b86

commit a204023d46bc02634f1c6f164cae99d327d53b86
Author: Derek Cheng <imcheng@chromium.org>
Date: Tue May 15 05:24:12 2018

[Cast MRP] Implement broadcast message.

Broadcast is currently implemented as a cast URL with a special
broadcast query parameter. When this URL is received, it is treated as
a request to broadcast a message to all cast devices instead of a
regular sink query.

Bug:  698940 
Change-Id: I25cfa6f84c2957f4fb63ec75b7a30007bfe47850
Reviewed-on: https://chromium-review.googlesource.com/944902
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558619}
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/mojo/media_router_desktop.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/cast_app_discovery_service.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/cast_app_discovery_service.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/cast_media_route_provider.h
[add] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/dual_media_sink_service.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/test/test_helper.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/browser/media/router/test/test_helper.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/common/media_router/providers/cast/cast_media_source.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/common/media_router/providers/cast/cast_media_source.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/common/media_router/providers/cast/cast_media_source_unittest.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/chrome/test/BUILD.gn
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/components/cast_channel/cast_message_handler.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/components/cast_channel/cast_message_handler.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/components/cast_channel/cast_message_util.cc
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/components/cast_channel/cast_message_util.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/components/cast_channel/cast_test_util.h
[modify] https://crrev.com/a204023d46bc02634f1c6f164cae99d327d53b86/components/cast_channel/cast_transport.cc

Sign in to add a comment