Page Speed Optimization Libraries  1.7.30.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
net_instaweb::FileRewriter Class Reference

#include "static_rewriter.h"

Inheritance diagram for net_instaweb::FileRewriter:
net_instaweb::RewriteDriverFactory

List of all members.

Public Member Functions

 FileRewriter (const RewriteGflags *gflags, bool echo_errors_to_stdout)
virtual Hasher * NewHasher ()
virtual UrlAsyncFetcherDefaultAsyncUrlFetcher ()
virtual MessageHandler * DefaultHtmlParseMessageHandler ()
virtual MessageHandler * DefaultMessageHandler ()
virtual FileSystem * DefaultFileSystem ()
virtual void SetupCaches (ServerContext *server_context)
virtual Statistics * statistics ()
virtual ServerContextNewServerContext ()
virtual bool UseBeaconResultsInFilters () const

Detailed Description

Implements a baseline RewriteDriverFactory with the simplest possible options for cache, fetchers, & system interface.

Todo:
TODO(jmarantz): fill out enough functionality so that this will be a functional static rewriter that could optimize an HTML file passed as a command-line parameter or via stdin.

Member Function Documentation

Implementors of RewriteDriverFactory must supply default definitions for each of these methods, although they may be overridden via set_ methods above. These methods all instantiate objects and transfer ownership to the caller.

Implements net_instaweb::RewriteDriverFactory.

Creates a new ServerContext* object. ServerContext itself must be overridden per Factory as it has at least one pure virtual method.

Implements net_instaweb::RewriteDriverFactory.

virtual void net_instaweb::FileRewriter::SetupCaches ( ServerContext server_context) [virtual]

Called from InitServerContext, but virtualized separately as it is platform-specific. This method must call on the server context: set_http_cache, set_metadata_cache, set_filesystem_metadata_cache, and MakePropertyCaches.

Implements net_instaweb::RewriteDriverFactory.

virtual Statistics* net_instaweb::FileRewriter::statistics ( ) [virtual]

statistics (default is NullStatistics). This can be overridden by calling SetStatistics, either from subclasses or externally.

Reimplemented from net_instaweb::RewriteDriverFactory.

virtual bool net_instaweb::FileRewriter::UseBeaconResultsInFilters ( ) const [inline, virtual]

Returns true if this platform uses beacon-based measurements to make run-time decisions. This is used to determine how to configure various beacon-based filters.

Implements net_instaweb::RewriteDriverFactory.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines