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

Unified Diff: chrome/common/render_messages.h

Issue 55049: Add the ability to specify a default MIME type when loading a resource. We'l... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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: chrome/common/render_messages.h
===================================================================
--- chrome/common/render_messages.h (revision 12710)
+++ chrome/common/render_messages.h (working copy)
@@ -253,6 +253,10 @@
// Additional HTTP request headers.
std::string headers;
+ // The default MIME type to use if the response lacks a Content-Type header.
+ // Use the empty string here if you don't want special MIME type handling.
+ std::string default_mime_type;
+
// URLRequest load flags (0 by default).
int load_flags;
@@ -1333,6 +1337,7 @@
WriteParam(m, p.frame_origin);
WriteParam(m, p.main_frame_origin);
WriteParam(m, p.headers);
+ WriteParam(m, p.default_mime_type);
WriteParam(m, p.load_flags);
WriteParam(m, p.origin_pid);
WriteParam(m, p.resource_type);
@@ -1348,6 +1353,7 @@
ReadParam(m, iter, &r->frame_origin) &&
ReadParam(m, iter, &r->main_frame_origin) &&
ReadParam(m, iter, &r->headers) &&
+ ReadParam(m, iter, &r->default_mime_type) &&
ReadParam(m, iter, &r->load_flags) &&
ReadParam(m, iter, &r->origin_pid) &&
ReadParam(m, iter, &r->resource_type) &&
@@ -1366,6 +1372,8 @@
l->append(L", ");
LogParam(p.main_frame_origin, l);
l->append(L", ");
+ LogParam(p.default_mime_type, l);
+ l->append(L", ");
LogParam(p.load_flags, l);
l->append(L", ");
LogParam(p.origin_pid, l);

Powered by Google App Engine
This is Rietveld 408576698