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); |