35 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_CRITICAL_FINDER_SUPPORT_UTIL_H_
36 #define NET_INSTAWEB_REWRITER_PUBLIC_CRITICAL_FINDER_SUPPORT_UTIL_H_
38 #include "net/instaweb/rewriter/critical_keys.pb.h"
39 #include "net/instaweb/util/public/property_cache.h"
45 namespace net_instaweb {
90 CriticalKeys* critical_keys);
99 const CriticalKeys& critical_keys,
108 const StringSet& new_set,
int support_value,
109 CriticalKeys* critical_keys);
111 bool ShouldBeacon(int64 next_beacon_timestamp_ms,
const RewriteDriver& driver);
115 kReplacePriorResult = 1,
116 kRequirePriorSupport = 2,
128 const StringSet& new_keys, StringPiece nonce,
int support_interval,
130 StringPiece property_name,
const PropertyCache* cache,
131 const PropertyCache::Cohort* cohort, AbstractPropertyPage* page,
132 MessageHandler* message_handler, Timer* timer);
148 NonceGenerator* nonce_generator,
149 RewriteDriver* driver,
150 bool using_candidate_key_detection,
151 BeaconMetadata* result);
159 bool clear_rebeacon_timestamp);
164 return (proto.valid_beacons_received() > 0);
CriticalKeysWriteFlags
Definition: critical_finder_support_util.h:113
const int64 kLowFreqBeaconMult
Definition: critical_finder_support_util.h:61
Nice name for lack of next two flags.
Definition: critical_finder_support_util.h:114
bool UpdateCandidateKeys(const StringSet &keys, CriticalKeys *proto, bool clear_rebeacon_timestamp)
bool IsBeaconDataAvailable(const CriticalKeys &proto)
Definition: critical_finder_support_util.h:163
const int64 kBeaconTimeoutIntervalMs
Definition: critical_finder_support_util.h:50
void UpdateCriticalKeys(bool require_prior_support, const StringSet &new_set, int support_value, CriticalKeys *critical_keys)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
const int64 kNonceExpirationLimit
Definition: critical_finder_support_util.h:66
Definition: rewrite_driver.h:100
void PrepareForBeaconInsertionHelper(CriticalKeys *proto, NonceGenerator *nonce_generator, RewriteDriver *driver, bool using_candidate_key_detection, BeaconMetadata *result)
void WriteCriticalKeysToPropertyCache(const StringSet &new_keys, StringPiece nonce, int support_interval, CriticalKeysWriteFlags flags, StringPiece property_name, const PropertyCache *cache, const PropertyCache::Cohort *cohort, AbstractPropertyPage *page, MessageHandler *message_handler, Timer *timer)
const int64 kHighFreqBeaconCount
Definition: critical_finder_support_util.h:54
void GetCriticalKeysFromProto(int64 support_percentage, const CriticalKeys &critical_keys, StringSet *keys)
Definition: message_handler.h:39
Definition: nonce_generator.h:28
bool ValidateAndExpireNonce(int64 now_ms, StringPiece nonce, CriticalKeys *critical_keys)