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

Unified Diff: webkit/browser/appcache/appcache_update_job.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: webkit/browser/appcache/appcache_update_job.cc
diff --git a/webkit/browser/appcache/appcache_update_job.cc b/webkit/browser/appcache/appcache_update_job.cc
index c3ea6b4ff581ae6697d67f2dde2bfb9dc5449862..e4f14dee4011c87aec4350823921269a95460d2a 100644
--- a/webkit/browser/appcache/appcache_update_job.cc
+++ b/webkit/browser/appcache/appcache_update_job.cc
@@ -13,6 +13,7 @@
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
+#include "net/base/request_priority.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_context.h"
@@ -91,15 +92,16 @@ AppCacheUpdateJob::UrlToFetch::~UrlToFetch() {
// Helper class to fetch resources. Depending on the fetch type,
// can either fetch to an in-memory string or write the response
// data out to the disk cache.
-AppCacheUpdateJob::URLFetcher::URLFetcher(
- const GURL& url, FetchType fetch_type, AppCacheUpdateJob* job)
+AppCacheUpdateJob::URLFetcher::URLFetcher(const GURL& url,
+ FetchType fetch_type,
+ AppCacheUpdateJob* job)
: url_(url),
job_(job),
fetch_type_(fetch_type),
retry_503_attempts_(0),
buffer_(new net::IOBuffer(kBufferSize)),
- request_(job->service_->request_context()->CreateRequest(url, this)) {
-}
+ request_(job->service_->request_context()
+ ->CreateRequest(url, net::DEFAULT_PRIORITY, this)) {}
AppCacheUpdateJob::URLFetcher::~URLFetcher() {
}
@@ -287,7 +289,8 @@ bool AppCacheUpdateJob::URLFetcher::MaybeRetryRequest() {
return false;
}
++retry_503_attempts_;
- request_.reset(job_->service_->request_context()->CreateRequest(url_, this));
+ request_ = job_->service_->request_context()->CreateRequest(
+ url_, net::DEFAULT_PRIORITY, this);
Start();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698