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

Unified Diff: net/url_request/url_request.h

Issue 51683002: [Net] Assert that URLRequests with LOAD_IGNORE_LIMITS have MAXIMUM_PRIORITY (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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_fetcher_core.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index e35e9fa2fdae39964ee765bfa84f90de40d5e7ed..606653ceb1d399088516c8e031ff8a0b71185ab9 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -550,7 +550,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Access the LOAD_* flags modifying this request (see load_flags.h).
int load_flags() const { return load_flags_; }
- void set_load_flags(int flags) { load_flags_ = flags; }
+
+ // The new flags may change the IGNORE_LIMITS flag only when called
+ // before Start() is called, it must only set the flag, and if set,
+ // the priority of this request must already be MAXIMUM_PRIORITY.
+ void SetLoadFlags(int flags);
// Returns true if the request is "pending" (i.e., if Start() has been called,
// and the response has not yet been called).
@@ -651,7 +655,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Returns the priority level for this request.
RequestPriority priority() const { return priority_; }
- // Sets the priority level for this request and any related jobs.
+ // Sets the priority level for this request and any related
+ // jobs. Must not change the priority to anything other than
+ // MAXIMUM_PRIORITY if the IGNORE_LIMITS load flag is set.
void SetPriority(RequestPriority priority);
// Returns true iff this request would be internally redirected to HTTPS
@@ -827,8 +833,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// first transaction in a request involving redirects.
UploadProgress final_upload_progress_;
- // The priority level for this request. Objects like ClientSocketPool use
- // this to determine which URLRequest to allocate sockets to first.
+ // The priority level for this request. Objects like
+ // ClientSocketPool use this to determine which URLRequest to
+ // allocate sockets to first.
RequestPriority priority_;
// TODO(battre): The only consumer of the identifier_ is currently the
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698