Page Speed Optimization Libraries
1.7.30.2
|
#include "proxy_interface_test_base.h"
Public Member Functions | |
BackgroundFetchCheckingUrlAsyncFetcher (UrlAsyncFetcher *fetcher) | |
virtual void | Fetch (const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch) |
int | num_background_fetches () |
void | clear_num_background_fetches () |
Subclass of UrlAsyncFetcher that wraps the AsyncFetch with a BackgroundFetchCheckingAsyncFetch.
virtual void net_instaweb::BackgroundFetchCheckingUrlAsyncFetcher::Fetch | ( | const GoogleString & | url, |
MessageHandler * | message_handler, | ||
AsyncFetch * | fetch | ||
) | [inline, 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(sligocki): GoogleString -> GoogleUrl or at least StringPiece.
TODO(sligocki): Include the URL in the fetch, like the request headers.
Implements net_instaweb::UrlAsyncFetcher.