Page Speed Optimization Libraries  1.9.32.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
strip_non_cacheable_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_STRIP_NON_CACHEABLE_FILTER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_STRIP_NON_CACHEABLE_FILTER_H_
21 
22 #include <vector>
23 
24 #include "net/instaweb/htmlparse/public/empty_html_filter.h"
28 
29 namespace net_instaweb {
30 
31 class HtmlElement;
32 class RewriteDriver;
33 class RewriteOptions;
34 
38 class StripNonCacheableFilter : public EmptyHtmlFilter {
39  public:
40  explicit StripNonCacheableFilter(RewriteDriver* rewrite_driver);
41  virtual ~StripNonCacheableFilter();
42 
43  virtual void StartDocument();
44  virtual void StartElement(HtmlElement* element);
45  virtual const char* Name() const { return "StripNonCacheableFilter"; }
46 
47  private:
48  RewriteDriver* rewrite_driver_;
49  const RewriteOptions* rewrite_options_;
50  AttributesToNonCacheableValuesMap attribute_non_cacheable_values_map_;
51  std::vector<int> panel_number_num_instances_;
52 
53  void InsertPanelStub(HtmlElement* element, const GoogleString& panel_id);
54 
55  DISALLOW_COPY_AND_ASSIGN(StripNonCacheableFilter);
56 };
57 
58 }
59 
60 #endif
Definition: rewrite_driver.h:98
Definition: strip_non_cacheable_filter.h:38
Definition: rewrite_options.h:81