Chromium Code Reviews| Index: content/public/browser/resource_throttle.h |
| diff --git a/content/public/browser/resource_throttle.h b/content/public/browser/resource_throttle.h |
| index 7a980f2a21691357e111eeebdf469ffc317c6c63..731d8b8efaa531e6130c1b6895ac4699cb2a458d 100644 |
| --- a/content/public/browser/resource_throttle.h |
| +++ b/content/public/browser/resource_throttle.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ |
| #define CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ |
| +#include "content/common/content_export.h" |
| + |
| namespace net { |
| struct RedirectInfo; |
| } |
| @@ -20,7 +22,7 @@ class ThrottlingResourceHandler; |
| // resource load. The ResourceController interface may be used to resume a |
| // deferred resource load, or it may be used to cancel a resource load at any |
| // time. |
| -class ResourceThrottle { |
| +class CONTENT_EXPORT ResourceThrottle { |
| public: |
| virtual ~ResourceThrottle() {} |
| @@ -42,6 +44,12 @@ class ResourceThrottle { |
| // returned string. |
| virtual const char* GetNameForLogging() const = 0; |
| + // Whether this ResourceThrottle needs to execute WillProcessResponse before |
| + // mime sniffing happens. Normally this is false. This should be set to true |
| + // if the ResourceThrottle wants to ensure that no part of the response will |
| + // be cached if the request is canceled in WillProcessResponse. |
| + virtual bool MustProcessResponseBeforeMimeSniffing(); |
|
mmenke
2016/07/27 19:34:01
Could name this be more general? MustProcessRespo
clamy
2016/08/17 12:47:35
Done.
To do what you suggest we have two options:
mmenke
2016/08/17 19:53:08
I don't think this is going to happen, reliably -
clamy
2016/08/18 12:01:51
Acknowledged.
|
| + |
| void set_controller_for_testing(ResourceController* c) { |
| controller_ = c; |
| } |