#include "file_load_policy.h"
Classes | |
struct | UrlFilename |
Public Member Functions | |
virtual bool | ShouldLoadFromFile (const GoogleUrl &url, GoogleString *filename) const |
virtual void | Associate (const StringPiece &url_prefix, const StringPiece &filename_prefix) |
virtual void | Merge (const FileLoadPolicy &other) |
Merge in other policies (needed for rewrite_options). |
Class for deciding which URLs get loaded from which files.
Currently, you must explicitly set which directories to load directly from filesystem.
virtual void net_instaweb::FileLoadPolicy::Associate | ( | const StringPiece & | url_prefix, | |
const StringPiece & | filename_prefix | |||
) | [virtual] |
Tells us to load all URLs with this prefix from filename_prefix directory. Both prefixes must specify directories, if they do not end in slashes, we add them.
Currently tests against youngest association first in case of overlapping prefixes. We may disallow overlapping prefixes in the future.
virtual bool net_instaweb::FileLoadPolicy::ShouldLoadFromFile | ( | const GoogleUrl & | url, | |
GoogleString * | filename | |||
) | const [virtual] |
Note: This is O(N) for N is number of calls to Associate.