23 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_RESOURCE_FETCH_H_
24 #define NET_INSTAWEB_REWRITER_PUBLIC_RESOURCE_FETCH_H_
29 #include "net/instaweb/util/public/google_url.h"
31 namespace net_instaweb {
37 class SyncFetcherAdapterCallback;
49 kDontAutoCleanupDriver
56 static void Start(
const GoogleUrl& url,
101 const RequestContextPtr& request_ctx);
106 virtual void HandleDone(
bool success);
111 MessageHandler* handler,
AsyncFetch* async_fetch);
117 static void ApplyExperimentOptions(
const GoogleUrl& url,
118 const RequestContextPtr& request_ctx,
122 GoogleUrl resource_url_;
125 MessageHandler* message_handler_;
127 int64 start_time_ms_;
virtual void HandleHeadersComplete()
Protected interface from AsyncFetch.
static void StartWithDriver(const GoogleUrl &url, CleanupMode cleanup_mode, ServerContext *server_context, RewriteDriver *driver, AsyncFetch *async_fetch)
static bool BlockingFetch(const GoogleUrl &url, ServerContext *server_context, RewriteDriver *driver, SyncFetcherAdapterCallback *async_fetch)
static void Start(const GoogleUrl &url, RewriteOptions *custom_options, bool using_spdy, ServerContext *server_context, AsyncFetch *async_fetch)
Class to help run an asynchronous fetch synchronously with a timeout.
Definition: sync_fetcher_adapter_callback.h:35
static RewriteDriver * GetDriver(const GoogleUrl &url, RewriteOptions *custom_options, ServerContext *server_context, const RequestContextPtr &request_ctx)
Definition: resource_fetch.h:44
CleanupMode
For StartWithDriver().
Definition: resource_fetch.h:47
Definition: async_fetch.h:267
Definition: async_fetch.h:53
Definition: rewrite_driver.h:98
Definition: server_context.h:100
Definition: rewrite_options.h:81