net_instaweb::FileLoadPolicy Class Reference

#include "file_load_policy.h"

List of all members.

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).

Detailed Description

Class for deciding which URLs get loaded from which files.

Currently, you must explicitly set which directories to load directly from filesystem.


Member Function Documentation

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.

Todo:
TODO(sligocki): Set up a more efficient mapper.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:00 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3