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

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: Fix leaks 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
« no previous file with comments | « net/url_request/url_request_test_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6a4fa5b420430346c436b8e0f8ffa9dfe8e44a1c 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -89,6 +89,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request,
: URLRequestJob(request, network_delegate),
auto_advance_(false),
stage_(WAITING),
+ priority_(DEFAULT_PRIORITY),
offset_(0),
async_buf_(NULL),
async_buf_size_(0),
@@ -101,6 +102,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request,
: URLRequestJob(request, network_delegate),
auto_advance_(auto_advance),
stage_(WAITING),
+ priority_(DEFAULT_PRIORITY),
offset_(0),
async_buf_(NULL),
async_buf_size_(0),
@@ -115,6 +117,7 @@ URLRequestTestJob::URLRequestTestJob(URLRequest* request,
: URLRequestJob(request, network_delegate),
auto_advance_(auto_advance),
stage_(WAITING),
+ priority_(DEFAULT_PRIORITY),
response_headers_(new HttpResponseHeaders(response_headers)),
response_data_(response_data),
offset_(0),
@@ -137,6 +140,10 @@ bool URLRequestTestJob::GetMimeType(std::string* mime_type) const {
return response_headers_->GetMimeType(mime_type);
}
+void URLRequestTestJob::SetPriority(RequestPriority priority) {
+ priority_ = priority;
+}
+
void URLRequestTestJob::Start() {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
@@ -226,7 +233,6 @@ bool URLRequestTestJob::IsRedirectResponse(GURL* location,
return true;
}
-
void URLRequestTestJob::Kill() {
stage_ = DONE;
URLRequestJob::Kill();
« no previous file with comments | « net/url_request/url_request_test_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698