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

#include "ua_sensitive_test_fetcher.h"

Inheritance diagram for net_instaweb::UserAgentSensitiveTestFetcher:
net_instaweb::UrlAsyncFetcher

Public Member Functions

 UserAgentSensitiveTestFetcher (UrlAsyncFetcher *base_fetcher)
 
virtual void Fetch (const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch)
 
virtual bool SupportsHttps () const
 
- Public Member Functions inherited from net_instaweb::UrlAsyncFetcher
virtual int64 timeout_ms ()
 
virtual void ShutDown ()
 
void set_fetch_with_gzip (bool x)
 
bool fetch_with_gzip () const
 
AsyncFetchEnableInflation (AsyncFetch *fetch) const
 

Additional Inherited Members

- Static Public Attributes inherited from net_instaweb::UrlAsyncFetcher
static const int64 kUnspecifiedTimeout
 
- Protected Member Functions inherited from net_instaweb::UrlAsyncFetcher
 UrlAsyncFetcher ()
 

Detailed Description

A helper fetcher that adds in UA to the URL, so we can use MockUrlAsyncFetcher w/UA-sensitive things. It also enforces the domain whitelist.

Member Function Documentation

virtual void net_instaweb::UserAgentSensitiveTestFetcher::Fetch ( const GoogleString url,
MessageHandler message_handler,
AsyncFetch fetch 
)
virtual

Asynchronously fetch a URL, set the response headers and stream the contents to fetch and call fetch->Done() when the fetch finishes.

There is an unchecked contract that response_headers are set before the response_writer or callback are used. Caution, several implementations do not satisfy this contract (but should).

Todo:

TODO(sligocki): GoogleString -> GoogleUrl or at least StringPiece.

TODO(sligocki): Include the URL in the fetch, like the request headers.

Implements net_instaweb::UrlAsyncFetcher.

virtual bool net_instaweb::UserAgentSensitiveTestFetcher::SupportsHttps ( ) const
virtual

Determine if the fetcher supports fetching using HTTPS. By default we assume a fetcher can.

Reimplemented from net_instaweb::UrlAsyncFetcher.


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