18 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_JAVASCRIPT_LIBRARY_IDENTIFICATION_H_
19 #define NET_INSTAWEB_REWRITER_PUBLIC_JAVASCRIPT_LIBRARY_IDENTIFICATION_H_
27 namespace net_instaweb {
36 typedef uint64 SizeInBytes;
43 bool empty()
const {
return libraries_.empty(); }
48 SizeInBytes bytes, StringPiece md5_hash, StringPiece canonical_url);
51 StringPiece
Find(StringPiece minified_code)
const;
53 void Merge(
const JavascriptLibraryIdentification& src);
63 typedef std::map<MD5Signature, GoogleString> MD5ToUrlMap;
64 typedef std::map<SizeInBytes, MD5ToUrlMap> LibraryMap;
66 LibraryMap libraries_;
void AppendSignature(GoogleString *signature) const
Append a signature for the libraries recognized to *signature.
StringPiece Find(StringPiece minified_code) const
Definition: javascript_library_identification.h:34
bool RegisterLibrary(SizeInBytes bytes, StringPiece md5_hash, StringPiece canonical_url)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
void Merge(const JavascriptLibraryIdentification &src)
Merge libraries recognized by src into this one.
static const int kNumHashChars
>=126 bits in base64
Definition: javascript_library_identification.h:38