diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 18:32:58 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 18:32:58 +0000 |
commit | 836fdef5a4583d8bc2abbbc45276ed985b62b0c7 (patch) | |
tree | b8c373e03743959e0a577fbe71f26e41d794a888 | |
parent | 67a2a39790d3bb9b37f5533049a4740ceeee9303 (diff) | |
download | chromium_src-836fdef5a4583d8bc2abbbc45276ed985b62b0c7.zip chromium_src-836fdef5a4583d8bc2abbbc45276ed985b62b0c7.tar.gz chromium_src-836fdef5a4583d8bc2abbbc45276ed985b62b0c7.tar.bz2 |
Merge 60488 - Add application/xml and text/xml to the list of content types
that we allow switching using http header.
BUG=56269
TEST=none
Review URL: http://codereview.chromium.org/3397025
TBR=amit@chromium.org
Review URL: http://codereview.chromium.org/3560003
git-svn-id: svn://svn.chromium.org/chrome/branches/517/src@61084 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome_frame/protocol_sink_wrap.cc | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc index 3160855..15d74e7 100644 --- a/chrome_frame/protocol_sink_wrap.cc +++ b/chrome_frame/protocol_sink_wrap.cc @@ -255,19 +255,22 @@ bool IsTextHtml(const wchar_t* status_text) { } bool IsAdditionallySupportedContentType(const wchar_t* status_text) { + static const char* kHeaderContentTypes[] = { + "application/xhtml+xml", + "application/xml", + "image/svg", + "image/svg+xml", + "text/xml", + "video/ogg", + "video/webm", + "video/mp4" + }; + const std::wstring str = status_text; - if (LowerCaseEqualsASCII(str, "application/xhtml+xml")) - return true; - if (LowerCaseEqualsASCII(str, "image/svg")) - return true; - if (LowerCaseEqualsASCII(str, "image/svg+xml")) - return true; - if (LowerCaseEqualsASCII(str, "video/ogg")) - return true; - if (LowerCaseEqualsASCII(str, "video/webm")) - return true; - if (LowerCaseEqualsASCII(str, "video/mp4")) - return true; + for (int i = 0; i < arraysize(kHeaderContentTypes); ++i) { + if (LowerCaseEqualsASCII(str, kHeaderContentTypes[i])) + return true; + } return false; } |