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

#include "mock_critical_images_finder.h"

Inheritance diagram for net_instaweb::MockCriticalImagesFinder:
net_instaweb::TestCriticalImagesFinder net_instaweb::CriticalImagesFinder

List of all members.

Public Member Functions

 MockCriticalImagesFinder (Statistics *stats)
 MockCriticalImagesFinder (const PropertyCache::Cohort *cohort, Statistics *stats)
virtual bool IsMeaningful (const RewriteDriver *driver) const
virtual void UpdateCriticalImagesSetInDriver (RewriteDriver *driver)
virtual RenderedImages * ExtractRenderedImageDimensionsFromCache (RewriteDriver *driver)
 Extracts rendered image dimensions from property cache.
virtual void ComputeCriticalImages (RewriteDriver *driver)
 Compute the critical images for the driver's url.
int num_compute_calls ()
void set_critical_images (StringSet *critical_images)
void set_css_critical_images (StringSet *css_critical_images)
void set_rendered_images (RenderedImages *rendered_images)
virtual bool IsCriticalImageInfoPresent (RewriteDriver *driver)

Detailed Description

Mock implementation of CriticalImagesFinder that can store and retrieve critical images. Note that this doesn't use property cache.


Member Function Documentation

Returns true if the critical images are available, false otherwise. This is virtual only to be overridden in tests.

Reimplemented from net_instaweb::CriticalImagesFinder.

virtual bool net_instaweb::MockCriticalImagesFinder::IsMeaningful ( const RewriteDriver driver) const [inline, virtual]

Checks whether IsHtmlCriticalImage will return meaningful results about critical images. Users of IsHtmlCriticalImage should check this function and supply a default behavior if IsMeaningful returns false.

Reimplemented from net_instaweb::TestCriticalImagesFinder.

Gets critical images if present in the property cache and updates the critical_images set in RewriteDriver with the obtained set. If you override this method, driver->critical_images_info() must not return NULL after this function has been called.

Reimplemented from net_instaweb::CriticalImagesFinder.


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