21 #ifndef PAGESPEED_KERNEL_HTTP_CONTENT_TYPE_H_
22 #define PAGESPEED_KERNEL_HTTP_CONTENT_TYPE_H_
29 namespace net_instaweb {
62 const char* mime_type()
const {
return mime_type_; }
65 Type type()
const {
return type_; }
134 const ContentType* MimeTypeToContentType(
const StringPiece& mime_type);
150 std::set<const ContentType*>* out);
void MimeTypeListToContentTypeSet(const GoogleString &in, std::set< const ContentType * > *out)
bool IsJsLike() const
Return true iff this content type is JS, or something similar like JSON.
const ContentType & kContentTypeHtml
HTML-like (i.e. rewritable) text:
const char * mime_type_
Definition: content_type.h:102
bool IsLikelyStaticResource() const
Heuristic to determine whether this should be treated as a static resource.
const ContentType & kContentTypePng
Images:
bool IsCss() const
Return true iff this content type is CSS.
const ContentType * NameExtensionToContentType(const StringPiece &name)
const char * file_extension() const
Definition: content_type.h:64
Binary resources.
Definition: content_type.h:53
bool IsCompressible() const
Heuristic to determine whether compressing the resource is beneficial.
const char * file_extension_
includes ".", e.g. ".ext"
Definition: content_type.h:103
bool IsVideo() const
Return true iff this content type is Video.
bool ParseContentType(const StringPiece &content_type_str, GoogleString *mime_type, GoogleString *charset)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
See http://en.wikipedia.org/wiki/CE-HTML.
Definition: content_type.h:37
bool IsImage() const
Return true iff this content type is Image.
Type
The MIME types we process.
Definition: content_type.h:34
Used to specify a new local ContentType in one test file.
Definition: content_type.h:54
static int MaxProducedExtensionLength()
Definition: content_type.h:31
const ContentType & kContentTypeJavascript
Other text:
bool IsFlash() const
Return true iff this content type is Flash.
const ContentType & kContentTypePdf
PDF:
bool IsAudio() const
Return true iff this content type is Audio.
const ContentType & kContentTypeBinaryOctetStream
Binary/octet-stream.