Page Speed Optimization Libraries
1.8.31.2
|
Public Member Functions | |
Context (RewriteDriver *driver, NestedFilter *filter, bool chain) | |
virtual void | RewriteSingle (const ResourcePtr &input, const OutputResourcePtr &output) |
Subclasses of SingleRewriteContext must override this: | |
virtual void | Harvest () |
Protected Member Functions | |
virtual const char * | id () const |
Returns the filter ID. | |
virtual OutputResourceKind | kind () const |
virtual void net_instaweb::NestedFilter::Context::Harvest | ( | ) | [virtual] |
Once any nested rewrites have completed, the results of these can be incorporated into the rewritten data. For contexts that do not require any nested RewriteContexts, it is OK to skip overriding this method -- the empty default implementation is fine.
Reimplemented from net_instaweb::RewriteContext.
virtual OutputResourceKind net_instaweb::NestedFilter::Context::kind | ( | ) | const [inline, protected, virtual] |
Rewrites come in three flavors, as described in output_resource_kind.h, so this method must be defined by subclasses to indicate which it is.
For example, we will avoid caching output_resource content in the HTTP cache for rewrites that are so quick to complete that it's fine to do the rewrite on every request. extend_cache is obviously in this category, and it's arguable we could treat js minification that way too (though we don't at the moment).
Implements net_instaweb::RewriteContext.