19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_CRITICAL_SELECTOR_FINDER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_CRITICAL_SELECTOR_FINDER_H_
22 #include "net/instaweb/rewriter/critical_keys.pb.h"
24 #include "net/instaweb/util/public/property_cache.h"
29 namespace net_instaweb {
44 StringSet critical_selectors;
53 static const char kCriticalSelectorsValidCount[];
54 static const char kCriticalSelectorsExpiredCount[];
55 static const char kCriticalSelectorsNotFoundCount[];
56 static const char kCriticalSelectorsPropertyName[];
78 const StringSet& selector_set, StringPiece nonce,
84 const StringSet& selector_set, StringPiece nonce,
int support_interval,
111 void UpdateCriticalSelectorInfoInDriver(
RewriteDriver* driver);
130 static void WriteCriticalSelectorsToPropertyCacheFromBeacon(
131 const StringSet& selector_set, StringPiece nonce,
138 static const int kDefaultSupportInterval = 10;
141 virtual int SupportInterval()
const {
return kDefaultSupportInterval; }
Abstract interface for implementing a PropertyPage.
Definition: property_cache.h:291
Definition: critical_selector_finder.h:43
Definition: property_cache.h:186
Adds property-semantics to a raw cache API.
Definition: property_cache.h:180
Definition: critical_selector_finder.h:123
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
CriticalSelectorFinder(const PropertyCache::Cohort *cohort, NonceGenerator *nonce_generator, Statistics *stats)
virtual void WriteCriticalSelectorsToPropertyCache(const StringSet &selector_set, StringPiece nonce, RewriteDriver *driver)
Definition: critical_selector_finder.h:51
BeaconMetadata PrepareForBeaconInsertion(const StringSet &selector_set, RewriteDriver *driver)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: rewrite_driver.h:100
Definition: message_handler.h:39
virtual int SupportInterval() const =0
Gets the SupportInterval for a new beacon result.
Definition: statistics.h:298
Definition: nonce_generator.h:28
Timer interface, made virtual so it can be mocked for tests.
Definition: timer.h:27
static void WriteCriticalSelectorsToPropertyCacheStatic(const StringSet &selector_set, StringPiece nonce, int support_interval, bool should_replace_prior_result, const PropertyCache *cache, const PropertyCache::Cohort *cohort, AbstractPropertyPage *page, MessageHandler *message_handler, Timer *timer)
virtual bool ShouldReplacePriorResult() const
Returns true if a beacon result should replace all previous results.
Definition: critical_selector_finder.h:102