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

#include "experiment_matcher.h"

List of all members.

Public Member Functions

virtual bool ClassifyIntoExperiment (const RequestHeaders &headers, 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,
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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines