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

#include "measurement_proxy_url_namer.h"

Inheritance diagram for net_instaweb::MeasurementProxyUrlNamer:
net_instaweb::UrlNamer

Public Member Functions

 MeasurementProxyUrlNamer (const GoogleString &top_origin, const GoogleString &password)
 
bool Decode (const GoogleUrl &request_url, const RewriteOptions *rewrite_options, GoogleString *decoded) const override
 
bool IsAuthorized (const GoogleUrl &request_url, const RewriteOptions &options) const override
 
ProxyExtent ProxyMode () const override
 
bool IsProxyEncoded (const GoogleUrl &url) const override
 
- Public Member Functions inherited from net_instaweb::UrlNamer
virtual GoogleString Encode (const RewriteOptions *rewrite_options, const OutputResource &output_resource, EncodeOption encode_option) const
 
virtual void ConfigureCustomOptions (const RequestHeaders &request_headers, RewriteOptions *options) const
 Configure custom options. Note that options may be NULL.
 
virtual void PrepForCrossDomain (AsyncFetch *) const
 Prepare Fetch for cross-domain request.
 
const GoogleStringproxy_domain () const
 
void set_proxy_domain (const GoogleString &proxy_domain)
 

Static Public Member Functions

static bool DecodePathDetails (const GoogleUrl &request_url, StringPiece *config, StringPiece *config_domain, StringPiece *password, GoogleString *res_url)
 

Additional Inherited Members

- Public Types inherited from net_instaweb::UrlNamer
enum  EncodeOption { kSharded, kUnsharded }
 
enum  ProxyExtent { kNone, ProxyExtent::kInputOnly, ProxyExtent::kFull }
 

Detailed Description

Implements a naming scheme that lets a proxy handle multiple domains. Suitable only for measurements/experiments, not regular use, as normally this would break the entire same origin model. This also assumes that there is something altering every request from the page to use our encoding before fetching via us (as this doesn't implement Encode() itself).

Member Function Documentation

bool net_instaweb::MeasurementProxyUrlNamer::Decode ( const GoogleUrl request_url,
const RewriteOptions rewrite_options,
GoogleString decoded 
) const
overridevirtual

Given the request_url, generate the original url.

Returns 'false' if request_url was not encoded via this namer.

Note: the default implementation always returns false. Note: rewrite_options may be NULL.

Reimplemented from net_instaweb::UrlNamer.

bool net_instaweb::MeasurementProxyUrlNamer::IsAuthorized ( const GoogleUrl request_url,
const RewriteOptions options 
) const
inlineoverridevirtual

Determines whether the provided request URL is authorized given the RewriteOptions.

The default implementation uses the domain lawyer in the options.

We want to fetch everything.

Reimplemented from net_instaweb::UrlNamer.

bool net_instaweb::MeasurementProxyUrlNamer::IsProxyEncoded ( const GoogleUrl url) const
overridevirtual

Determines whether the specified URL has been mapped to that central proxy domain.

Reimplemented from net_instaweb::UrlNamer.

ProxyExtent net_instaweb::MeasurementProxyUrlNamer::ProxyMode ( ) const
inlineoverridevirtual

Determines whether the naming policy incorporates proxying resources using a central proxy domain.

Reimplemented from net_instaweb::UrlNamer.


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