Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::ExperimentMatcher Class Reference

#include "experiment_matcher.h"

Public Member Functions

virtual bool ClassifyIntoExperiment (const RequestHeaders &headers, const UserAgentMatcher &matcher, RewriteOptions *options)
 
virtual void StoreExperimentData (int state, const StringPiece &url, int64 expiration_time_ms, ResponseHeaders *headers)
 

Detailed Description

Provides a way to replace the mapping of clients/sessions to experiments.

The default implementation of the experiment framework uses cookies to send clients to the same experiment consistently. This implementation can be overridden to divide clients/sessions into experiments using a different mechanism.

Member Function Documentation

virtual bool net_instaweb::ExperimentMatcher::ClassifyIntoExperiment ( const RequestHeaders headers,
const UserAgentMatcher matcher,
RewriteOptions options 
)
virtual

Decides which experiment to place the current client/session into. Returns true if the mapping needs to be stored.

virtual void net_instaweb::ExperimentMatcher::StoreExperimentData ( int  state,
const StringPiece &  url,
int64  expiration_time_ms,
ResponseHeaders headers 
)
virtual

Stores the client/session -> experiment mapping for the domain indicated by url. The experiment id is indicated by state. The default implementation stores this in a cookie in the response headers, setting it to expire at expiration_time_ms (specified as ms since the epoch).


The documentation for this class was generated from the following file: