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

Side by Side Diff: net/base/mime_util.cc

Issue 1061833002: Add epub mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 { "text/plain", "txt,text" }, 219 { "text/plain", "txt,text" },
220 { "text/html", "ehtml" }, 220 { "text/html", "ehtml" },
221 { "application/rss+xml", "rss" }, 221 { "application/rss+xml", "rss" },
222 { "application/rdf+xml", "rdf" }, 222 { "application/rdf+xml", "rdf" },
223 { "text/xml", "xsl,xbl,xslt" }, 223 { "text/xml", "xsl,xbl,xslt" },
224 { "application/vnd.mozilla.xul+xml", "xul" }, 224 { "application/vnd.mozilla.xul+xml", "xul" },
225 { "application/x-shockwave-flash", "swf,swl" }, 225 { "application/x-shockwave-flash", "swf,swl" },
226 { "application/pkcs7-mime", "p7m,p7c,p7z" }, 226 { "application/pkcs7-mime", "p7m,p7c,p7z" },
227 { "application/pkcs7-signature", "p7s" }, 227 { "application/pkcs7-signature", "p7s" },
228 { "application/x-mpegurl", "m3u8" }, 228 { "application/x-mpegurl", "m3u8" },
229 { "application/epub+zip", "epub" },
eroman 2015/04/06 19:10:18 Is there any details that you can provide on this
yawano 2015/04/07 02:00:40 application/epub+zip appears in IANA Media Types.
229 }; 230 };
230 231
231 static const char* FindMimeType(const MimeInfo* mappings, 232 static const char* FindMimeType(const MimeInfo* mappings,
232 size_t mappings_len, 233 size_t mappings_len,
233 const char* ext) { 234 const char* ext) {
234 size_t ext_len = strlen(ext); 235 size_t ext_len = strlen(ext);
235 236
236 for (size_t i = 0; i < mappings_len; ++i) { 237 for (size_t i = 0; i < mappings_len; ++i) {
237 const char* extensions = mappings[i].extensions; 238 const char* extensions = mappings[i].extensions;
238 for (;;) { 239 for (;;) {
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 post_data->append("\r\n" + value + "\r\n"); 1410 post_data->append("\r\n" + value + "\r\n");
1410 } 1411 }
1411 1412
1412 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, 1413 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary,
1413 std::string* post_data) { 1414 std::string* post_data) {
1414 DCHECK(post_data); 1415 DCHECK(post_data);
1415 post_data->append("--" + mime_boundary + "--\r\n"); 1416 post_data->append("--" + mime_boundary + "--\r\n");
1416 } 1417 }
1417 1418
1418 } // namespace net 1419 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698