18 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_SUPPRESS_PREHEAD_FILTER_H_
19 #define NET_INSTAWEB_REWRITER_PUBLIC_SUPPRESS_PREHEAD_FILTER_H_
21 #include "net/instaweb/htmlparse/public/html_writer_filter.h"
22 #include "net/instaweb/http/public/response_headers.h"
27 #include "net/instaweb/util/public/split_writer.h"
29 namespace net_instaweb {
45 virtual void StartDocument();
47 virtual void StartElement(HtmlElement* element);
49 virtual void EndElement(HtmlElement* element);
51 virtual void EndDocument();
58 friend class SuppressPreheadFilterTest;
59 void SendCookies(HtmlElement* element);
61 void PreHeadDone(HtmlElement* element);
63 static void UpdateFetchLatencyInFlushEarlyProto(int64 latency,
67 bool ExtractAndUpdateXUACompatible(HtmlElement* element);
69 bool seen_start_html_;
70 bool seen_first_head_;
72 bool has_x_ua_compatible_;
74 HtmlElement* noscript_element_;
76 GoogleString pre_head_;
77 GoogleString charset_;
79 Writer* original_writer_;
80 StringWriter pre_head_writer_;
81 scoped_ptr<SplitWriter> pre_head_and_response_writer_;
83 scoped_ptr<ResponseHeaders> response_headers_;
Definition: rewrite_driver.h:98
Definition: suppress_prehead_filter.h:41