Page Speed Optimization Libraries
1.9.32.1
|
#include "url_partnership.h"
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 RewriteOptions * | rewrite_options () const |
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:
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.
|
inline |
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 |
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.
GoogleString net_instaweb::UrlPartnership::ResolvedBase | ( | ) | const |
Computes the resolved base common to all URLs. This will always have a trailing slash.