Page Speed Optimization Libraries  1.7.30.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
net_instaweb::UrlPartnership Class Reference

#include "url_partnership.h"

List of all members.

Public Member Functions

 UrlPartnership (const RewriteDriver *driver)
bool AddUrl (const StringPiece &resource_url, MessageHandler *handler)
GoogleString ResolvedBase () const
int num_urls () const
 Returns the number of URLs that have been successfully added.
GoogleString RelativePath (int index) const
const GoogleUrl * FullPath (int index) const
 Returns the full resolved path.
void RemoveLast ()
 Removes the last URL that was added to the partnership.
virtual void Reset (const GoogleUrl &original_request)
int NumCommonComponents () const

Protected Member Functions

const RewriteOptionsrewrite_options () const

Detailed Description

A URL partnership should be established in order to combine resources, such as in CSS combination, JS combination, or image spriting. This class centralizes the handling of such combinations, answering two questions: 1. Is it legal for a new URL to enter into the partnership 2. What is the greatest common prefix 3. What are the unique suffices for the elements.


Member Function Documentation

bool net_instaweb::UrlPartnership::AddUrl ( const StringPiece &  resource_url,
MessageHandler *  handler 
)

Adds a URL to a combination. If it can be legally added, consulting the DomainLaywer, then true is returned.

Returns the number of common path components for all resources in this partnership.

GoogleString net_instaweb::UrlPartnership::RelativePath ( int  index) const

Returns the relative path of a particular URL that was added into the partnership. This requires that Resolve() be called first.

virtual void net_instaweb::UrlPartnership::Reset ( const GoogleUrl &  original_request) [virtual]

Establish a new URL as the original request, which is used for domain authorization and mapping of URLs as they are added to the partnership.

Computes the resolved base common to all URLs. This will always have a trailing slash.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines