Page Speed Optimization Libraries  1.6.29.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::CriticalImagesFinder net_instaweb::ForwardingMockCriticalImagesFinder

List of all members.

Public Member Functions

 MockCriticalImagesFinder (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.
virtual const
PropertyCache::Cohort
GetCriticalImagesCohort () const
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 CriticalCssFinder that can store and retrieve critical images. Note that this doesn't use property cache.


Member Function Documentation

Identifies which cohort in the PropertyCache the critical image information is located in.

Returns NULL as there is no call to GetCriticalImagesCohort() in this class.

Implements net_instaweb::CriticalImagesFinder.

Reimplemented in net_instaweb::ForwardingMockCriticalImagesFinder.

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

Reimplemented from net_instaweb::CriticalImagesFinder.

Reimplemented in net_instaweb::ForwardingMockCriticalImagesFinder.

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.

Implements net_instaweb::CriticalImagesFinder.

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.

Reimplemented in net_instaweb::ForwardingMockCriticalImagesFinder.


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