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

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

Issue 1839473002: Centralize the setting of Accept headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 4 years, 8 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/mime_type_resource_handler.h
diff --git a/content/browser/loader/mime_type_resource_handler.h b/content/browser/loader/mime_type_resource_handler.h
index 9217683584dc4ee0f2c0e888c1f455eff4cadaa9..411ffd12df687c866ddb089d753bb15909733589 100644
--- a/content/browser/loader/mime_type_resource_handler.h
+++ b/content/browser/loader/mime_type_resource_handler.h
@@ -34,6 +34,10 @@ struct WebPluginInfo;
// subsequent reads until it's done buffering. As a result, the buffer
// returned by the next ResourceHandler must have a capacity of at least
// net::kMaxBytesToSniff * 2.
+//
+// Before a request is sent, this ResourceHandler will also set an appropriate
+// Accept header on the request based on its ResourceType, if one isn't already
+// present.
class CONTENT_EXPORT MimeTypeResourceHandler
: public LayeredResourceHandler,
public ResourceController {
@@ -49,6 +53,7 @@ class CONTENT_EXPORT MimeTypeResourceHandler
// ResourceHandler implementation:
void SetController(ResourceController* controller) override;
bool OnResponseStarted(ResourceResponse* response, bool* defer) override;
+ bool OnWillStart(const GURL&, bool* defer) override;
bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
int* buf_size,
int min_size) override;
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/loader/mime_type_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698