diff options
author | annacc@chromium.org <annacc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 00:42:44 +0000 |
---|---|---|
committer | annacc@chromium.org <annacc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 00:42:44 +0000 |
commit | 6415176be8ad6b36d4adafa1c8e76aa89c5ca17c (patch) | |
tree | 271c1b4f03a5976ff6924558f97e76257dba39ee /webkit/glue | |
parent | 443b80e00142dab08385eba06fcea79c96bbee6b (diff) | |
download | chromium_src-6415176be8ad6b36d4adafa1c8e76aa89c5ca17c.zip chromium_src-6415176be8ad6b36d4adafa1c8e76aa89c5ca17c.tar.gz chromium_src-6415176be8ad6b36d4adafa1c8e76aa89c5ca17c.tar.bz2 |
Using WebFrame::createAssociatedURLLoader() instead of WebFrame::dispatchWillSendRequest(...)
According to,
http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/WebKit/chromium/public/WebFrame.h
WebFrame::dispatchWillSendRequest is now deprecated. Updating to use createAssociatedURLLoader() instead.
BUG=65806
TEST=media
Review URL: http://codereview.chromium.org/5515008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/media/buffered_data_source.cc | 5 | ||||
-rw-r--r-- | webkit/glue/media/simple_data_source.cc | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc index c5e39b7..ec7a3a0 100644 --- a/webkit/glue/media/buffered_data_source.cc +++ b/webkit/glue/media/buffered_data_source.cc @@ -144,17 +144,16 @@ void BufferedResourceLoader::Start(net::CompletionCallback* start_callback, // Prepare the request. WebURLRequest request(url_); + request.setTargetType(WebURLRequest::TargetIsMedia); request.setHTTPHeaderField(WebString::fromUTF8("Range"), WebString::fromUTF8(GenerateHeaders( first_byte_position_, last_byte_position_))); frame->setReferrerForRequest(request, WebKit::WebURL()); - // TODO(annacc): we should be using createAssociatedURLLoader() instead? - frame->dispatchWillSendRequest(request); // This flag is for unittests as we don't want to reset |url_loader| if (!keep_test_loader_) - url_loader_.reset(WebKit::webKitClient()->createURLLoader()); + url_loader_.reset(frame->createAssociatedURLLoader()); // Start the resource loading. url_loader_->loadAsynchronously(request, this); diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc index 97a9c39..fd69a0a 100644 --- a/webkit/glue/media/simple_data_source.cc +++ b/webkit/glue/media/simple_data_source.cc @@ -244,14 +244,13 @@ void SimpleDataSource::StartTask() { } else { // Prepare the request. WebKit::WebURLRequest request(url_); + request.setTargetType(WebKit::WebURLRequest::TargetIsMedia); frame_->setReferrerForRequest(request, WebKit::WebURL()); - // TODO(annacc): we should be using createAssociatedURLLoader() instead? - frame_->dispatchWillSendRequest(request); // This flag is for unittests as we don't want to reset |url_loader| if (!keep_test_loader_) - url_loader_.reset(WebKit::webKitClient()->createURLLoader()); + url_loader_.reset(frame_->createAssociatedURLLoader()); // Start the resource loading. url_loader_->loadAsynchronously(request, this); |