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

Unified Diff: content/browser/loader/resource_handler.h

Issue 2005273002: Move MimeTypeResourceHandler before ThrottlingResourceHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to one class Created 4 years, 7 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: content/browser/loader/resource_handler.h
diff --git a/content/browser/loader/resource_handler.h b/content/browser/loader/resource_handler.h
index caf9a7a6803194a918f1b547a803db7393015ac2..f6bbeede4312a3419690f1c555cafa54873e906d 100644
--- a/content/browser/loader/resource_handler.h
+++ b/content/browser/loader/resource_handler.h
@@ -108,6 +108,18 @@ class CONTENT_EXPORT ResourceHandler
// with OnDataDownloaded calls.
virtual void OnDataDownloaded(int bytes_downloaded) = 0;
+ // Whether this ResourceHandler is a leaf handler (ie the last handler in a
+ // chain of handlers).
+ virtual bool IsLeafHandler() const;
+
+ // If this handler points to a leaf handler, replaces it with |new_handler|
+ // while delivering |payload_for_old_handler| and simulating the end of the
+ // request on the former leaf handler.
+ // This should never be called on a leaf handler.
+ virtual void InstallNewLeafHandler(
+ std::unique_ptr<ResourceHandler> new_handler,
+ const std::string& payload_for_old_handler);
+
protected:
ResourceHandler(net::URLRequest* request);

Powered by Google App Engine
This is Rietveld 408576698