Page Speed Optimization Libraries
1.13.35.1
|
#include "url_segment_encoder.h"
Public Member Functions | |
virtual void | Encode (const StringVector &urls, const ResourceContext *data, GoogleString *url_segment) const |
virtual bool | Decode (const StringPiece &url_segment, StringVector *urls, ResourceContext *out_data, MessageHandler *handler) const |
Base class that describes encoding of url segments by rewriters. Most instances of this will want to delegate to UrlEscaper.
|
virtual |
Decode URLs from "url_segment". Note that there may be other meta-data encoded in url_segment, which this function will write into out_data, if present.
Reimplemented in net_instaweb::ImageUrlEncoder, net_instaweb::CssUrlEncoder, and net_instaweb::UrlMultipartEncoder.
|
virtual |
Encodes arbitrary text so it can be used in a url segment. A url segment must contain only characters that are legal in URLs, and exclude "/" and "." which are used for a higher level encoding scheme into which this must fit.
'data' is optional – it can be NULL and it is up to the encoder to decide what to do.
Reimplemented in net_instaweb::ImageUrlEncoder, net_instaweb::CssUrlEncoder, and net_instaweb::UrlMultipartEncoder.