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

Unified Diff: content/public/browser/resource_throttle.h

Issue 2005273002: Move MimeTypeResourceHandler before ThrottlingResourceHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 3 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
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/browser/resource_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..da1054c86cfb5c26bf2890fa82190fcb934c2400 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,13 @@ class ResourceThrottle {
// returned string.
virtual const char* GetNameForLogging() const = 0;
+ // Whether this ResourceThrottle needs to execute WillProcessResponse before
+ // any part of the response body is read. Normally this is false. This should
+ // be set to true if the ResourceThrottle wants to ensure that no part of the
+ // response body will be cached if the request is canceled in
+ // WillProcessResponse.
+ virtual bool MustProcessResponseBeforeReadingBody();
+
void set_controller_for_testing(ResourceController* c) {
controller_ = c;
}
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/browser/resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698