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

Unified Diff: net/url_request/url_request.cc

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 5d3e26b47fedbce7b639f88bab9879b91e1a9667..00d744a14ab5d55972bc92b1d461aecdb4e6597a 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -828,6 +828,17 @@ int64 URLRequest::GetExpectedContentSize() const {
return expected_content_size;
}
+void URLRequest::SetPriority(RequestPriority priority) {
+ DCHECK_GE(priority, MINIMUM_PRIORITY);
+ DCHECK_LT(priority, NUM_PRIORITIES);
mmenke 2013/03/12 18:40:22 if priority matches priority_, should we abort ear
akalin 2013/03/12 22:08:28 Done.
+ priority_ = priority;
+ if (job_) {
+ net_log_.AddEvent(NetLog::TYPE_URL_REQUEST_SET_PRIORITY,
+ NetLog::IntegerCallback("priority", priority_));
+ job_->SetPriority(priority_);
+ }
+}
+
bool URLRequest::GetHSTSRedirect(GURL* redirect_url) const {
const GURL& url = this->url();
if (!url.SchemeIs("http"))

Powered by Google App Engine
This is Rietveld 408576698