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

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

Issue 2366753002: Have MimeSniffingResourceHandler call WillStartRequest on new Handlers. (Closed)
Patch Set: Fix 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 | « no previous file | content/browser/loader/intercepting_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/intercepting_resource_handler.h
diff --git a/content/browser/loader/intercepting_resource_handler.h b/content/browser/loader/intercepting_resource_handler.h
index 8729e5b271ed7a72efb8f1f202f7d1a011f4041c..4be72b85d466db7ed83224b507eb1c169d53d778 100644
--- a/content/browser/loader/intercepting_resource_handler.h
+++ b/content/browser/loader/intercepting_resource_handler.h
@@ -42,14 +42,16 @@ class CONTENT_EXPORT InterceptingResourceHandler
// Replaces the next handler with |new_handler|, sending
// |payload_for_old_handler| to the old handler. Must be called after
// OnWillStart and OnRequestRedirected and before OnResponseStarted. One
- // OnWillRead call is permitted beforehand. |new_handler|'s OnWillStart and
- // OnRequestRedirected methods will not be called.
+ // OnWillRead call is permitted beforehand. |new_handler| is assumed to
+ // be advanced to a state where it can take the place of the old handler
+ // (The InterceptingResourceHandler won't call OnWillStart or
+ // OnRequestRedirected, but will pass along newly read data).
void UseNewHandler(std::unique_ptr<ResourceHandler> new_handler,
const std::string& payload_for_old_handler);
// Used in tests.
- ResourceHandler* new_handler_for_testing() const {
- return new_handler_.get();
+ ResourceHandler* next_handler_for_testing() const {
+ return next_handler_.get();
}
private:
« no previous file with comments | « no previous file | content/browser/loader/intercepting_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698