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

Unified Diff: webkit/glue/media/buffered_data_source.cc

Issue 212011: Remove whiltelist checks for protocol for <audio> and <video> (Closed)
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/media/buffered_data_source.cc
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index f081f043661400bb99d33c491f02e6c8ea8a8336..1267d59fcd566c00e579f8ed58b0b93ac9d1ceb9 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -56,14 +56,6 @@ const int kReadTrials = 3;
// of FFmpeg.
const int kInitialReadBufferSize = 32768;
-// A helper method that accepts only HTTP, HTTPS and FILE protocol.
-// TODO(hclam): Support also FTP protocol.
-bool IsSchemeSupported(const GURL& url) {
- return url.SchemeIs(kHttpScheme) ||
- url.SchemeIs(kHttpsScheme) ||
- url.SchemeIsFile();
-}
-
} // namespace
namespace webkit_glue {
@@ -213,13 +205,6 @@ bool BufferedResourceLoader::OnReceivedRedirect(
// In this case we shouldn't do anything.
if (!start_callback_.get())
return true;
-
- // If we got redirected to an unsupported protocol then stop.
- if (!IsSchemeSupported(new_url)) {
- DoneStart(net::ERR_ADDRESS_INVALID);
- Stop();
- }
-
return true;
}
@@ -512,12 +497,6 @@ void BufferedDataSource::Initialize(const std::string& url,
// Saves the url.
url_ = GURL(url);
- if (!IsSchemeSupported(url_)) {
- host()->SetError(media::PIPELINE_ERROR_NETWORK);
- DoneInitialization();
- return;
- }
-
media_format_.SetAsString(media::MediaFormat::kMimeType,
media::mime_type::kApplicationOctetStream);
media_format_.SetAsString(media::MediaFormat::kURL, url);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698