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

Unified Diff: net/base/mime_sniffer.h

Issue 1058003005: Mime sniffer: reduce table from 256 bytes to 4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix for MSVC 64-bit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/BUILD.gn ('k') | net/base/mime_sniffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_sniffer.h
diff --git a/net/base/mime_sniffer.h b/net/base/mime_sniffer.h
index 77f3833fe85e799bd5ec90cf2463d99da3bb6edd..371a3309ad3190c02f8e38453506a5849e8e0382 100644
--- a/net/base/mime_sniffer.h
+++ b/net/base/mime_sniffer.h
@@ -57,6 +57,13 @@ NET_EXPORT bool SniffMimeTypeFromLocalData(const char* content,
size_t content_size,
std::string* result);
+// Returns true if |content| contains bytes that are control codes that do
+// not usually appear in plain text.
+// @param content A buffer contains bytes that may be binary.
+// @param size The number of bytes in the |content| buffer.
+// @return Returns true if |content| looks like binary.
+NET_EXPORT_PRIVATE bool LooksLikeBinary(const char* content, size_t size);
+
} // namespace net
#endif // NET_BASE_MIME_SNIFFER_H__
« no previous file with comments | « net/BUILD.gn ('k') | net/base/mime_sniffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698