Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
google_font_css_inline_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 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 
20 
21 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_GOOGLE_FONT_CSS_INLINE_FILTER_H_
22 #define NET_INSTAWEB_REWRITER_PUBLIC_GOOGLE_FONT_CSS_INLINE_FILTER_H_
23 
27 
28 namespace net_instaweb {
29 
30 class GoogleUrl;
31 class RewriteDriver;
32 class Statistics;
33 
35  public:
37  explicit GoogleFontCssInlineFilter(RewriteDriver* driver);
38  virtual ~GoogleFontCssInlineFilter();
39 
40  static void InitStats(Statistics* statistics);
41 
42  virtual const char* Name() const { return "InlineGoogleFontCss"; }
43 
44  protected:
45  virtual ResourcePtr CreateResource(const char* url, bool* is_authorized);
46 
47  private:
48  void ResetAndExplainReason(const char* reason, ResourcePtr* resource);
49  void CheckIfFontServiceUrl(const GoogleUrl& url, bool* result);
50 
51 
52 };
53 
54 }
55 
56 #endif
class GoogleUrl
Definition: google_url.h:58
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
GoogleFontCssInlineFilter(RewriteDriver *driver)
Note: this also registers our resource url claimant with the driver.
Definition: google_font_css_inline_filter.h:34
Definition: rewrite_driver.h:100
Inline small CSS files.
Definition: css_inline_filter.h:42
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: google_font_css_inline_filter.h:42
virtual ResourcePtr CreateResource(const char *url, bool *is_authorized)