19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_FILE_LOAD_RULE_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_FILE_LOAD_RULE_H_
22 #include "net/instaweb/util/public/manually_ref_counted.h"
27 namespace net_instaweb {
40 explicit FileLoadRule(
bool allowed) : allowed_(allowed) {}
43 Classification
Classify(
const GoogleString& filename)
const;
47 virtual bool Match(
const GoogleString& filename)
const = 0;
59 filename_regexp_(filename_regexp),
60 filename_regexp_str_(filename_regexp)
63 virtual bool Match(
const GoogleString& filename)
const;
66 const RE2 filename_regexp_;
68 const GoogleString filename_regexp_str_;
80 :
FileLoadRule(allowed), filename_prefix_(filename_prefix)
83 virtual bool Match(
const GoogleString& filename)
const;
86 const GoogleString filename_prefix_;
Definition: file_load_rule.h:73
FileLoadRuleRegexp(const GoogleString &filename_regexp, bool allowed)
Definition: file_load_rule.h:57
virtual bool Match(const GoogleString &filename) const
Is does this rule apply to this filename?
virtual bool Match(const GoogleString &filename) const
Is does this rule apply to this filename?
FileLoadRuleLiteral(const GoogleString &filename_prefix, bool allowed)
Definition: file_load_rule.h:79
Classification Classify(const GoogleString &filename) const
What does this rule say about this filename?
Definition: file_load_rule.h:51
virtual bool Match(const GoogleString &filename) const =0
Is does this rule apply to this filename?
Definition: file_load_rule.h:31