Page Speed Optimization Libraries  1.9.32.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
downstream_caching_directives.h
1 // Copyright 2013 Google Inc. All Rights Reserved.
14 
15 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_DOWNSTREAM_CACHING_DIRECTIVES_H_
16 #define NET_INSTAWEB_REWRITER_PUBLIC_DOWNSTREAM_CACHING_DIRECTIVES_H_
17 
18 #include "pagespeed/kernel/base/basictypes.h"
19 #include "pagespeed/kernel/base/gtest_prod.h"
20 #include "pagespeed/kernel/base/string.h"
21 
22 namespace net_instaweb {
23 
24 class RequestHeaders;
25 
32  public:
35  static const char kNoCapabilitiesSpecified[];
36 
38  virtual ~DownstreamCachingDirectives();
39 
43  const RequestHeaders& request_headers);
44 
47  bool SupportsImageInlining() const;
48  bool SupportsLazyloadImages() const;
51  bool SupportsJsDefer() const;
52  bool SupportsWebp() const;
53  bool SupportsWebpLosslessAlpha() const;
54 
55  private:
70  static bool IsPropertySupported(LazyBool* supports_property,
71  const GoogleString& capability,
72  const GoogleString& capability_list);
73 
74  mutable LazyBool supports_image_inlining_;
75  mutable LazyBool supports_js_defer_;
76  mutable LazyBool supports_lazyload_images_;
77  mutable LazyBool supports_webp_;
78  mutable LazyBool supports_webp_lossless_alpha_;
79 
80  GoogleString capabilities_to_be_supported_;
81 
82  DISALLOW_COPY_AND_ASSIGN(DownstreamCachingDirectives);
83 };
84 
85 }
86 
87 #endif
Definition: downstream_caching_directives.h:31
void ParseCapabilityListFromRequestHeaders(const RequestHeaders &request_headers)
static const char kNoCapabilitiesSpecified[]
Definition: downstream_caching_directives.h:35