Page Speed Optimization Libraries
1.4.26.1
|
#include "domain_rewrite_filter.h"
Public Types | |
enum | RewriteResult { kRewroteDomain, kDomainUnchanged, kFail } |
Public Member Functions | |
DomainRewriteFilter (RewriteDriver *rewrite_driver, Statistics *stats) | |
virtual void | StartDocumentImpl () |
virtual void | StartElementImpl (HtmlElement *element) |
virtual void | EndElementImpl (HtmlElement *element) |
virtual const char * | Name () const |
The name of this filter -- used for logging and debugging. | |
RewriteResult | Rewrite (const StringPiece &input_url, const GoogleUrl &base_url, bool apply_sharding, GoogleString *output_url) |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
Filter that rewrites URL domains for resources that are not otherwise rewritten. For example, the user may want to domain-shard adding a hash to their URL leaves, or domain shard resources that are not cacheable.
RewriteResult net_instaweb::DomainRewriteFilter::Rewrite | ( | const StringPiece & | input_url, |
const GoogleUrl & | base_url, | ||
bool | apply_sharding, | ||
GoogleString * | output_url | ||
) |
Rewrites the specified URL (which might be relative to the base tag) into an absolute sharded url.
Absolute URL output_url will be set if kRewroteDomain or kDomainUnchanged returned.
virtual void net_instaweb::DomainRewriteFilter::StartDocumentImpl | ( | ) | [virtual] |
Overload these implementer methods: Intentionally left abstract so that implementers don't forget to change the name from Blah to BlahImpl.
Implements net_instaweb::CommonFilter.