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

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

Issue 1134393002: Implement ChromeOS mime type extension mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Flag guard two test cases for ChromeOS. Created 5 years, 7 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
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 #ifndef NET_BASE_MIME_UTIL_H__ 5 #ifndef NET_BASE_MIME_UTIL_H__
6 #define NET_BASE_MIME_UTIL_H__ 6 #define NET_BASE_MIME_UTIL_H__
7 7
8 // This file defines MIME utility functions. All of them assume the MIME type 8 // This file defines MIME utility functions. All of them assume the MIME type
9 // to be of the format specified by rfc2045. According to it, MIME types are 9 // to be of the format specified by rfc2045. According to it, MIME types are
10 // case strongly insensitive except parameter values, which may or may not be 10 // case strongly insensitive except parameter values, which may or may not be
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 const std::string& value, 159 const std::string& value,
160 const std::string& mime_boundary, 160 const std::string& mime_boundary,
161 const std::string& content_type, 161 const std::string& content_type,
162 std::string* post_data); 162 std::string* post_data);
163 163
164 // Adds the final delimiter to a multi-part upload request. 164 // Adds the final delimiter to a multi-part upload request.
165 NET_EXPORT void AddMultipartFinalDelimiterForUpload( 165 NET_EXPORT void AddMultipartFinalDelimiterForUpload(
166 const std::string& mime_boundary, 166 const std::string& mime_boundary,
167 std::string* post_data); 167 std::string* post_data);
168 168
169 struct MimeInfo {
170 const char* const mime_type;
171 const char* const extensions; // comma separated list
172 };
173
174 // Find mime type of |ext| from |mapping|.
eroman 2015/05/18 15:45:24 Find --> Finds |mapping| --> |mappings|
yawano 2015/05/19 02:26:40 Done.
175 const char* FindMimeType(const MimeInfo* mappings,
176 size_t mappings_len,
177 const char* ext);
178
169 } // namespace net 179 } // namespace net
170 180
171 #endif // NET_BASE_MIME_UTIL_H__ 181 #endif // NET_BASE_MIME_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698