summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-28 07:13:19 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-28 07:13:19 +0000
commite53db4462779be3af76c63404314afe7a1464657 (patch)
tree9c90fa8655cf542bdc35a4819fea2327804a84ef /chrome/common/render_messages.h
parent06294933c1ae46a2c6aa22bb0b6eac48582330f6 (diff)
downloadchromium_src-e53db4462779be3af76c63404314afe7a1464657.zip
chromium_src-e53db4462779be3af76c63404314afe7a1464657.tar.gz
chromium_src-e53db4462779be3af76c63404314afe7a1464657.tar.bz2
Add the ability to specify a default MIME type when loading a resource. We'll need this to correctly load stylesheets that lack a Content-Type header in standards mode.
We're waiting on https://bugs.webkit.org/show_bug.cgi?id=24904 upstream before this works fully. This change, as it stands, is a no-op. R=wtc BUG=7448 Review URL: http://codereview.chromium.org/55049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 28dd519a..284ac51 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -253,6 +253,10 @@ struct ViewHostMsg_Resource_Request {
// 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 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
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 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
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 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
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);