Skip to content
Snippets Groups Projects
Commit 6415176b authored by annacc@chromium.org's avatar annacc@chromium.org
Browse files

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
parent 443b80e0
No related merge requests found
......@@ -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);
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment