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

Issue 2927503002: [Presentation API / Media Router] Relax PresentationRequest URL check. (Closed)

Created:
3 years, 6 months ago by imcheng
Modified:
3 years, 6 months ago
Reviewers:
mark a. foltz, whywhat
CC:
blink-reviews, chromium-reviews, haraken, imcheng+watch_chromium.org, mfoltz+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API / Media Router] Relax PresentationRequest URL check. The idea is that instead checking if the scheme of a Presentation URL is supported in Blink, we will do that in MR. This patch defines a whitelist of schemes supported by MR. This patch also enforces the scheme check on the URL given during a presentation availability call. PresentationServiceDelegateImpl will report availability = false for URLs of unsupported schemes. This also fixes a problem where you actually cannot use a cast:* URL in a https side despite having been "whitelisted" in Blink, due to the MixedContent check (which isn't needed, since the URL does not refer to an actual network resource). The integration tests for desktop are also updated with new URLs, including test:*. See accompanying extension CL: cl/158049822 BUG=711541 Review-Url: https://codereview.chromium.org/2927503002 Cr-Commit-Position: refs/heads/master@{#477735} Committed: https://chromium.googlesource.com/chromium/src/+/e86537c744f1410319ce3ea4659f8c022f67ece3

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : updated scheme check in mr + tests #

Total comments: 6

Patch Set 4 : Addressed Mark's comments #

Patch Set 5 : add missing #include and updated test #

Patch Set 6 : Really add #include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -28 lines) Patch
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 5 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/common/media_router/media_source_helper.cc View 1 2 3 4 5 3 chunks +15 lines, -1 line 0 comments Download
M chrome/common/media_router/media_source_helper_unittest.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/test/media_router/resources/common.js View 1 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp View 1 2 3 4 1 chunk +14 lines, -12 lines 0 comments Download

Messages

Total messages: 30 (17 generated)
imcheng
While thinking of how we can support custom schemes in Presentation API (and update the ...
3 years, 6 months ago (2017-06-06 01:16:10 UTC) #3
whywhat
We currently parse the Uri without checking for its validity here: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSource.java?rcl=0cb66cf7b8cbc857c590ca5499f0ad6828684702&l=78 Then we get ...
3 years, 6 months ago (2017-06-06 01:32:39 UTC) #4
mark a. foltz
On 2017/06/06 at 01:32:39, avayvod wrote: > We currently parse the Uri without checking for ...
3 years, 6 months ago (2017-06-06 18:51:59 UTC) #5
whywhat
On 2017/06/06 at 18:51:59, mfoltz wrote: > On 2017/06/06 at 01:32:39, avayvod wrote: > > ...
3 years, 6 months ago (2017-06-06 18:56:27 UTC) #6
whywhat
On 2017/06/06 at 18:56:27, whywhat wrote: > On 2017/06/06 at 18:51:59, mfoltz wrote: > > ...
3 years, 6 months ago (2017-06-06 18:57:27 UTC) #7
imcheng
On 2017/06/06 18:57:27, whywhat wrote: > On 2017/06/06 at 18:56:27, whywhat wrote: > > On ...
3 years, 6 months ago (2017-06-06 19:55:58 UTC) #8
imcheng
Updated patch with tests. PTAL.
3 years, 6 months ago (2017-06-06 22:08:08 UTC) #10
mark a. foltz
Thanks for being flexible. LGTM with comments addressed. https://codereview.chromium.org/2927503002/diff/40001/chrome/common/media_router/media_source_helper.cc File chrome/common/media_router/media_source_helper.cc (right): https://codereview.chromium.org/2927503002/diff/40001/chrome/common/media_router/media_source_helper.cc#newcode34 chrome/common/media_router/media_source_helper.cc:34: constexpr ...
3 years, 6 months ago (2017-06-06 22:49:08 UTC) #11
imcheng
https://codereview.chromium.org/2927503002/diff/40001/chrome/common/media_router/media_source_helper.cc File chrome/common/media_router/media_source_helper.cc (right): https://codereview.chromium.org/2927503002/diff/40001/chrome/common/media_router/media_source_helper.cc#newcode34 chrome/common/media_router/media_source_helper.cc:34: constexpr std::array<const char* const, 4> kAllowedSchemes{ On 2017/06/06 22:49:08, ...
3 years, 6 months ago (2017-06-07 00:53:44 UTC) #12
mark a. foltz
On 2017/06/07 at 00:53:44, imcheng wrote: > https://codereview.chromium.org/2927503002/diff/40001/chrome/common/media_router/media_source_helper.cc > File chrome/common/media_router/media_source_helper.cc (right): > > https://codereview.chromium.org/2927503002/diff/40001/chrome/common/media_router/media_source_helper.cc#newcode34 ...
3 years, 6 months ago (2017-06-07 16:32:07 UTC) #17
whywhat
lgtm thanks for adding remote-playback:// into the list!
3 years, 6 months ago (2017-06-07 18:50:14 UTC) #22
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/2927503002/60002
3 years, 6 months ago (2017-06-07 19:43:36 UTC) #27
commit-bot: I haz the power
3 years, 6 months ago (2017-06-07 19:49:17 UTC) #30
Message was sent while issue was closed.
Committed patchset #6 (id:60002) as
https://chromium.googlesource.com/chromium/src/+/e86537c744f1410319ce3ea4659f...

Powered by Google App Engine
This is Rietveld 408576698