27 #ifndef NET_INSTAWEB_AUTOMATIC_PUBLIC_PROXY_INTERFACE_H_
28 #define NET_INSTAWEB_AUTOMATIC_PUBLIC_PROXY_INTERFACE_H_
31 #include "pagespeed/kernel/base/basictypes.h"
32 #include "pagespeed/kernel/base/scoped_ptr.h"
33 #include "pagespeed/kernel/base/string.h"
34 #include "pagespeed/kernel/base/string_util.h"
36 namespace net_instaweb {
41 class ProxyFetchPropertyCallbackCollector;
42 class ProxyFetchFactory;
56 static void InitStats(Statistics* statistics);
61 virtual void Fetch(
const GoogleString& requested_url,
62 MessageHandler* handler,
68 static const char kCacheHtmlRequestCount[];
72 bool is_resource_fetch,
73 const GoogleUrl& request_url,
76 const bool requires_blink_cohort,
77 bool* added_page_property_callback);
84 friend class ProxyInterfaceTest;
89 void ProxyRequest(
bool is_resource_fetch,
90 const GoogleUrl& requested_url,
92 MessageHandler* handler);
97 void GetRewriteOptionsDone(RequestData* request_data,
102 bool UrlAndPortMatchThisServer(
const GoogleUrl& url);
107 const GoogleString hostname_;
112 TimedVariable* all_requests_;
114 TimedVariable* pagespeed_requests_;
116 TimedVariable* cache_html_flow_requests_;
118 TimedVariable* rejected_requests_;
120 TimedVariable* requests_without_domain_config_;
122 TimedVariable* resource_requests_without_domain_config_;
124 scoped_ptr<ProxyFetchFactory> proxy_fetch_factory_;
virtual ProxyFetchPropertyCallbackCollector * InitiatePropertyCacheLookup(bool is_resource_fetch, const GoogleUrl &request_url, RewriteOptions *options, AsyncFetch *async_fetch, const bool requires_blink_cohort, bool *added_page_property_callback)
Initiates the PropertyCache look up.
bool IsWellFormedUrl(const GoogleUrl &url)
Is this url_string well-formed enough to proxy through?
virtual void Fetch(const GoogleString &requested_url, MessageHandler *handler, AsyncFetch *async_fetch)
Definition: proxy_interface.h:49
static void InitStats(Statistics *statistics)
Initializes statistics variables associated with this class.
Definition: proxy_fetch.h:178
Definition: async_fetch.h:53
Definition: server_context.h:101
Definition: rewrite_options.h:83
ServerContext * server_context_
Needed by subclasses when overriding InitiatePropertyCacheLookup.
Definition: proxy_interface.h:81
Definition: url_async_fetcher.h:33