Skip to content

Commit

Permalink
Remove whiltelist checks for protocol for <audio> and <video>
Browse files Browse the repository at this point in the history
BUG=22152

Allow <audio> and <video> to request urls with protocol not limited
to file, http and https.

Review URL: http://codereview.chromium.org/212011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26532 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hclam@chromium.org committed Sep 18, 2009
1 parent a51b060 commit c69157c
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions webkit/glue/media/buffered_data_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c69157c

Please sign in to comment.