| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SNIFFER_H__ | 5 #ifndef NET_BASE_MIME_SNIFFER_H__ |
| 6 #define NET_BASE_MIME_SNIFFER_H__ | 6 #define NET_BASE_MIME_SNIFFER_H__ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 11 | 13 |
| 12 class GURL; | 14 class GURL; |
| 13 | 15 |
| 14 namespace net { | 16 namespace net { |
| 15 | 17 |
| 16 // The maximum number of bytes used by any internal mime sniffing routine. May | 18 // The maximum number of bytes used by any internal mime sniffing routine. May |
| 17 // be useful for callers to determine an efficient buffer size to pass to | 19 // be useful for callers to determine an efficient buffer size to pass to |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Returns true if |content| contains bytes that are control codes that do | 62 // Returns true if |content| contains bytes that are control codes that do |
| 61 // not usually appear in plain text. | 63 // not usually appear in plain text. |
| 62 // @param content A buffer contains bytes that may be binary. | 64 // @param content A buffer contains bytes that may be binary. |
| 63 // @param size The number of bytes in the |content| buffer. | 65 // @param size The number of bytes in the |content| buffer. |
| 64 // @return Returns true if |content| looks like binary. | 66 // @return Returns true if |content| looks like binary. |
| 65 NET_EXPORT_PRIVATE bool LooksLikeBinary(const char* content, size_t size); | 67 NET_EXPORT_PRIVATE bool LooksLikeBinary(const char* content, size_t size); |
| 66 | 68 |
| 67 } // namespace net | 69 } // namespace net |
| 68 | 70 |
| 69 #endif // NET_BASE_MIME_SNIFFER_H__ | 71 #endif // NET_BASE_MIME_SNIFFER_H__ |
| OLD | NEW |