19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_FILE_LOAD_POLICY_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_FILE_LOAD_POLICY_H_
23 #include "pagespeed/kernel/base/basictypes.h"
24 #include "pagespeed/kernel/base/gtest_prod.h"
25 #include "pagespeed/kernel/base/string.h"
26 #include "pagespeed/kernel/base/string_util.h"
28 namespace net_instaweb {
31 class FileLoadMapping;
49 GoogleString* filename)
const;
58 virtual void Associate(
const StringPiece& url_prefix,
59 const StringPiece& filename_prefix);
76 const StringPiece& filename_prefix,
109 virtual bool AddRule(
const GoogleString& rule,
bool is_regexp,
bool allowed,
110 GoogleString* error);
116 virtual bool ShouldLoadFromFileHelper(
const GoogleUrl& url,
117 GoogleString* filename)
const;
120 typedef std::list<FileLoadMapping*> FileLoadMappings;
121 FileLoadMappings file_load_mappings_;
122 typedef std::list<FileLoadRule*> FileLoadRules;
123 FileLoadRules file_load_rules_;
virtual void Merge(const FileLoadPolicy &other)
Merge in other policies (needed for rewrite_options).
virtual bool ShouldLoadFromFile(const GoogleUrl &url, GoogleString *filename) const
virtual void Associate(const StringPiece &url_prefix, const StringPiece &filename_prefix)
Definition: file_load_policy.h:41
virtual bool AssociateRegexp(const StringPiece &url_regexp, const StringPiece &filename_prefix, GoogleString *error)
virtual bool AddRule(const GoogleString &rule, bool is_regexp, bool allowed, GoogleString *error)