Index: chrome/browser/prerender/prerender_resource_throttle.h |
diff --git a/chrome/browser/prerender/prerender_resource_throttle.h b/chrome/browser/prerender/prerender_resource_throttle.h |
index a9f853ec9ccb45379d74940b614b10688629d6d5..0302ec5e710298dafae4a28e357071045579c303 100644 |
--- a/chrome/browser/prerender/prerender_resource_throttle.h |
+++ b/chrome/browser/prerender/prerender_resource_throttle.h |
@@ -10,10 +10,12 @@ |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/optional.h" |
#include "chrome/common/prerender_types.h" |
#include "content/public/browser/resource_request_info.h" |
#include "content/public/browser/resource_throttle.h" |
#include "content/public/common/resource_type.h" |
+#include "net/base/request_priority.h" |
class GURL; |
@@ -50,6 +52,9 @@ class PrerenderResourceThrottle |
// May only be called if currently throttling the resource. |
void ResumeHandler(); |
+ // Resets the resource priority back to its original value. |
+ void ResetResourcePriority(); |
+ |
static void OverridePrerenderContentsForTesting(PrerenderContents* contents); |
private: |
@@ -90,6 +95,11 @@ class PrerenderResourceThrottle |
net::URLRequest* request_; |
int load_flags_; // Load flags to be OR'ed with the existing request flags. |
+ // The throttle changes most request priorities to IDLE during prerendering. |
+ // The priority is reset back to the original priority when prerendering is |
+ // finished. |
+ base::Optional<net::RequestPriority> original_request_priority_; |
+ |
scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info_; |
DISALLOW_COPY_AND_ASSIGN(PrerenderResourceThrottle); |