summaryrefslogtreecommitdiffstats
path: root/net/base/mime_util.cc
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 17:39:46 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 17:39:46 +0000
commit72d1e597c85fbf6b45756e3c753696370c48c042 (patch)
treed01609d62295e34aa3a5721d4109f815d0fd23ad /net/base/mime_util.cc
parent9475d1d189c03a0626c4855b38f6004bfe7c5bb8 (diff)
downloadchromium_src-72d1e597c85fbf6b45756e3c753696370c48c042.zip
chromium_src-72d1e597c85fbf6b45756e3c753696370c48c042.tar.gz
chromium_src-72d1e597c85fbf6b45756e3c753696370c48c042.tar.bz2
Slight code change to make some global variables const.
Fix >80 cols lines. Review URL: http://codereview.chromium.org/42013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mime_util.cc')
-rw-r--r--net/base/mime_util.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 1528d3a..aec47a9 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -155,7 +155,7 @@ bool MimeUtil::GetMimeTypeFromFile(const FilePath& file_path,
// From WebKit's WebCore/platform/MIMETypeRegistry.cpp:
-static const char* supported_image_types[] = {
+static const char* const supported_image_types[] = {
"image/jpeg",
"image/jpg",
"image/png",
@@ -166,7 +166,7 @@ static const char* supported_image_types[] = {
};
// Note: does not include javascript types list (see supported_javascript_types)
-static const char* supported_non_image_types[] = {
+static const char* const supported_non_image_types[] = {
"text/html",
"text/xml",
"text/xsl",
@@ -181,12 +181,16 @@ static const char* supported_non_image_types[] = {
};
// Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript.
-// Mozilla 1.8 accepts application/javascript, application/ecmascript, and application/x-javascript, but WinIE 7 doesn't.
-// WinIE 7 accepts text/javascript1.1 - text/javascript1.3, text/jscript, and text/livescript, but Mozilla 1.8 doesn't.
+// Mozilla 1.8 accepts application/javascript, application/ecmascript, and
+// application/x-javascript, but WinIE 7 doesn't.
+// WinIE 7 accepts text/javascript1.1 - text/javascript1.3, text/jscript, and
+// text/livescript, but Mozilla 1.8 doesn't.
// Mozilla 1.8 allows leading and trailing whitespace, but WinIE 7 doesn't.
-// Mozilla 1.8 and WinIE 7 both accept the empty string, but neither accept a whitespace-only string.
-// We want to accept all the values that either of these browsers accept, but not other values.
-static const char* supported_javascript_types[] = {
+// Mozilla 1.8 and WinIE 7 both accept the empty string, but neither accept a
+// whitespace-only string.
+// We want to accept all the values that either of these browsers accept, but
+// not other values.
+static const char* const supported_javascript_types[] = {
"text/javascript",
"text/ecmascript",
"application/javascript",
@@ -199,7 +203,7 @@ static const char* supported_javascript_types[] = {
"text/livescript"
};
-static const char* view_source_types[] = {
+static const char* const view_source_types[] = {
"text/xml",
"text/xsl",
"application/xml",
@@ -333,4 +337,3 @@ bool MatchesMimeType(const std::string &mime_type_pattern,
}
} // namespace net
-