Lines Matching refs:magic
108 // The number of content bytes we need to use all our magic numbers. Feel free
109 // to increase this number if you add a longer magic number.
114 const char* magic;
117 const char* mask; // if set, must have same length as |magic|
120 #define MAGIC_NUMBER(mime_type, magic) \
121 { (mime_type), (magic), sizeof(magic)-1, false, NULL },
130 #define verified_sizeof(magic, mask) \
131 VerifySizes<sizeof(magic), sizeof(mask)>::SIZES
133 #define MAGIC_MASK(mime_type, magic, mask) \
134 { (mime_type), (magic), verified_sizeof(magic, mask)-1, false, (mask) },
136 // Magic strings are case insensitive and must not include '\0' characters
137 #define MAGIC_STRING(mime_type, magic) \
138 { (mime_type), (magic), sizeof(magic)-1, true, NULL },
179 // Including these magic number for Flash is a trade off.
193 // The number of content bytes we need to use all our Microsoft Office magic
302 // Compare content header to a magic number where magic_entry can contain '.'
341 // To compare with magic strings, we need to compute strlen(content), but
352 match = (base::strncasecmp(magic_entry.magic, content, len) == 0);
357 match = MagicCmp(magic_entry.magic, content, len);
359 match = MagicMaskCmp(magic_entry.magic, content, len, magic_entry.mask);
372 const MagicNumber* magic, size_t magic_len,
376 if (MatchMagicNumber(content, size, magic[i], result)) {
434 // Check our big table of Magic Numbers
455 // Check our table of magic numbers for Office file types.
557 // Check our table of magic numbers for Office file types. If it does not
766 // Technically, the crx magic number is just Cr24, but the bytes after that
771 // TODO(aa): If we ever have another magic number, we'll want to pass a
937 // Check the file extension and magic numbers to see if this is an Office
938 // document. This needs to be checked before the general magic numbers
939 // because zip files and Office documents (OOXML) have the same magic number.
942 return true; // We've matched a magic number. No more content needed.
944 // We're not interested in sniffing for magic numbers when the type_hint
949 // Now we look in our large table of magic numbers to see if we can find
953 return true; // We've matched a magic number. No more content needed.