Inline small CSS files.
More...
#include "css_inline_filter.h"
|
static void | InitStats (Statistics *statistics) |
|
static bool | HasClosingStyleTag (StringPiece contents) |
|
static bool | ExtractMetaTagDetails (const HtmlElement &element, const ResponseHeaders *headers, GoogleString *content, GoogleString *mime_type, GoogleString *charset) |
|
|
static const char | kNumCssInlined [] |
|
static const char | kCreateResourceFailedDebugMsg [] |
| Debug message to be inserted when resource creation fails.
|
|
Inlining css from unauthorized domains into HTML is considered safe because it does not cause any new content to be executed compared to the unoptimized page.
Reimplemented from net_instaweb::CommonFilter.
virtual ResourcePtr net_instaweb::CssInlineFilter::CreateResource |
( |
const char * |
url, |
|
|
bool * |
is_authorized |
|
) |
| |
|
protectedvirtual |
virtual bool net_instaweb::CssInlineFilter::IntendedForInlining |
( |
| ) |
const |
|
inlinevirtual |
Returns true if the filter intends to inline the resource it fetches. This is to support AllowWhenInlining. Unlike AllowUnauthorizedDomain() this doesn't have security implications and is just used for performance tuning.
Reimplemented from net_instaweb::CommonFilter.
void net_instaweb::CssInlineFilter::set_id |
( |
const char * |
id | ) |
|
|
inlineprotected |
Changes filter id code (which shows up in cache keys and .pagespeed.id. URLs). Expects id to be a literal.
virtual void net_instaweb::CssInlineFilter::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.
The documentation for this class was generated from the following file: