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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 51953002: [Net] Add a priority parameter to URLRequest's constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 2 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: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 657b385d92993f6612524de071949fcb7e24e7d8..1e66263b635f5bb2383e156ad495d3e286b5cee5 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1040,7 +1040,8 @@ void ResourceDispatcherHostImpl::BeginRequest(
// Construct the request.
scoped_ptr<net::URLRequest> new_request;
net::URLRequest* request;
- new_request.reset(request_context->CreateRequest(request_data.url, NULL));
+ new_request = request_context->CreateRequest(
+ request_data.url, request_data.priority, NULL);
request = new_request.get();
request->set_method(request_data.method);
@@ -1052,7 +1053,6 @@ void ResourceDispatcherHostImpl::BeginRequest(
request->SetExtraRequestHeaders(headers);
request->set_load_flags(load_flags);
- request->SetPriority(request_data.priority);
// Resolve elements from request_body and prepare upload data.
if (request_data.request_body.get()) {
@@ -1293,7 +1293,7 @@ void ResourceDispatcherHostImpl::BeginSaveFile(
}
scoped_ptr<net::URLRequest> request(
- request_context->CreateRequest(url, NULL));
+ request_context->CreateRequest(url, net::DEFAULT_PRIORITY, NULL));
request->set_method("GET");
SetReferrerForRequest(request.get(), referrer);
« no previous file with comments | « content/browser/fileapi/file_writer_delegate_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698