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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp

Issue 2927503002: [Presentation API / Media Router] Relax PresentationRequest URL check. (Closed)
Patch Set: Really add #include Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
index 155bee0c4904f6bb1c6fb5294c3baa1516a4dae5..50eddd6157a04c3db10f18ef73cb56567edc8594 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -84,14 +84,14 @@ PresentationRequest* PresentationRequest::Create(
for (size_t i = 0; i < urls.size(); ++i) {
const KURL& parsed_url = KURL(execution_context->Url(), urls[i]);
- if (!parsed_url.IsValid() || !(parsed_url.ProtocolIsInHTTPFamily() ||
- parsed_url.ProtocolIs("cast"))) {
+ if (!parsed_url.IsValid()) {
exception_state.ThrowDOMException(
kSyntaxError, "'" + urls[i] + "' can't be resolved to a valid URL.");
return nullptr;
}
- if (MixedContentChecker::IsMixedContent(
+ if (parsed_url.ProtocolIsInHTTPFamily() &&
+ MixedContentChecker::IsMixedContent(
execution_context->GetSecurityOrigin(), parsed_url)) {
exception_state.ThrowSecurityError(
"Presentation of an insecure document [" + urls[i] +

Powered by Google App Engine
This is Rietveld 408576698