Page Speed Optimization Libraries
1.13.35.1
|
Class that parses showads snippets. More...
#include "show_ads_snippet_parser.h"
Public Types | |
typedef std::map< GoogleString, GoogleString > | AttributeMap |
Public Member Functions | |
bool | ParseStrict (const GoogleString &snippet, const pagespeed::js::JsTokenizerPatterns *tokenizer_patterns, AttributeMap *parsed_attributes) const |
Class that parses showads snippets.
bool net_instaweb::ShowAdsSnippetParser::ParseStrict | ( | const GoogleString & | snippet, |
const pagespeed::js::JsTokenizerPatterns * | tokenizer_patterns, | ||
AttributeMap * | parsed_attributes | ||
) | const |
Parses showads attributes from 'snippet' and stores the parsed attributes in 'parsed_attributes'. It returns true if snippet contains only assignments of showads attributes and there is at most one assignment for each showads attribute. The data in 'parsed_attributes' is meaningful only when this method returns true.