Public Member Functions | |
FileInputResource (ResourceManager *resource_manager, const RewriteOptions *options, const ContentType *type, const StringPiece &url, const StringPiece &filename) | |
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 |
Protected Member Functions | |
void | SetDefaultHeaders (const ContentType *content_type, ResponseHeaders *header, MessageHandler *handler) |
virtual bool | Load (MessageHandler *message_handler) |
virtual bool net_instaweb::FileInputResource::IsValidAndCacheable | ( | ) | const [virtual] |
Uses default no-op Freshen implementation because file-based resources are fetched each time they are needed.
Reimplemented from net_instaweb::Resource.
virtual bool net_instaweb::FileInputResource::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.
virtual const RewriteOptions* net_instaweb::FileInputResource::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.