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

Unified Diff: net/url_request/url_request_test_job.cc

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more tests Created 7 years, 9 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: net/url_request/url_request_test_job.cc
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index 05b562b68301c15dcc2c8fc2794e378d484f318f..56c172d37357bef4fd9021db24d1df47c2d46564 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -89,6 +89,8 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request,
: URLRequestJob(request, network_delegate),
auto_advance_(false),
stage_(WAITING),
+ // Let |request| set |priority_| itself.
+ priority_(IDLE),
offset_(0),
async_buf_(NULL),
async_buf_size_(0),
@@ -101,6 +103,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request,
: URLRequestJob(request, network_delegate),
auto_advance_(auto_advance),
stage_(WAITING),
+ priority_(IDLE),
offset_(0),
async_buf_(NULL),
async_buf_size_(0),
@@ -115,6 +118,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request,
: URLRequestJob(request, network_delegate),
auto_advance_(auto_advance),
stage_(WAITING),
+ priority_(IDLE),
response_headers_(new HttpResponseHeaders(response_headers)),
response_data_(response_data),
offset_(0),
@@ -226,6 +230,9 @@ bool URLRequestTestJob::IsRedirectResponse(GURL* location,
return true;
}
+void URLRequestTestJob::SetPriority(RequestPriority priority) {
+ priority_ = priority;
+}
void URLRequestTestJob::Kill() {
stage_ = DONE;

Powered by Google App Engine
This is Rietveld 408576698