Page Speed Optimization Libraries
1.2.24.1
|
Public Member Functions | |
virtual bool | IsValidAndCacheable () const |
virtual void | FillInPartitionInputInfo (HashHint include_content_hash, InputInfo *input) |
Set OutputPartition's input info used for expiration validation. | |
virtual GoogleString | url () const |
Gets the absolute URL of the resource. | |
virtual const RewriteOptions * | rewrite_options () const |
Static Public Member Functions | |
static ResourcePtr | Make (const StringPiece &url, ServerContext *resource_manager) |
We expose a factory; parse failure returns NULL. | |
Protected Member Functions | |
virtual bool | Load (MessageHandler *message_handler) |
virtual bool | IsCacheable () const |
virtual bool net_instaweb::DataUrlInputResource::IsValidAndCacheable | ( | ) | const [virtual] |
Checks if the contents are loaded and valid and also if the resource is up-to-date and cacheable by a proxy like us.
Reimplemented from net_instaweb::Resource.
virtual bool net_instaweb::DataUrlInputResource::Load | ( | MessageHandler * | message_handler | ) | [protected, virtual] |
Load the resource asynchronously, storing ResponseHeaders and contents in cache. Returns true, if the resource is already loaded or loaded synchronously. Never reports uncacheable resources.
Implements net_instaweb::Resource.
static ResourcePtr net_instaweb::DataUrlInputResource::Make | ( | const StringPiece & | url, |
ServerContext * | resource_manager | ||
) | [inline, static] |
We expose a factory; parse failure returns NULL.
We create the local copy of the url early, because encoded_contents will in general be a substring of this local copy and must have the same lifetime.
virtual const RewriteOptions* net_instaweb::DataUrlInputResource::rewrite_options | ( | ) | const [inline, virtual] |
Obtain rewrite options for this. Any resources which return true for IsCacheable() but don't unconditionally return true for loaded() must override this in a useful way. Used in cache invalidation.
Implements net_instaweb::Resource.