15 #ifndef PAGESPEED_KERNEL_HTTP_USER_AGENT_MATCHER_H_
16 #define PAGESPEED_KERNEL_HTTP_USER_AGENT_MATCHER_H_
32 namespace net_instaweb {
66 bool IsIe(
const StringPiece& user_agent)
const;
67 bool IsIe9(
const StringPiece& user_agent)
const;
69 virtual bool SupportsImageInlining(
const StringPiece& user_agent)
const;
70 bool SupportsLazyloadImages(StringPiece user_agent)
const;
78 const StringPiece& user_agent,
88 bool SupportsJsDefer(
const StringPiece& user_agent,
bool allow_mobile)
const;
93 bool LegacyWebp(
const StringPiece& user_agent)
const;
110 bool SupportsDnsPrefetch(
const StringPiece& user_agent)
const;
112 virtual bool IsAndroidUserAgent(
const StringPiece& user_agent)
const;
113 virtual bool IsiOSUserAgent(
const StringPiece& user_agent)
const;
118 int* minor,
int* build,
int* patch)
const;
120 bool UserAgentExceedsChromeAndroidBuildAndPatch(
121 const StringPiece& user_agent,
int required_build,
122 int required_patch)
const;
124 bool UserAgentExceedsChromeiOSBuildAndPatch(
125 const StringPiece& user_agent,
int required_build,
126 int required_patch)
const;
128 bool UserAgentExceedsChromeBuildAndPatch(
129 const StringPiece& user_agent,
int required_build,
130 int required_patch)
const;
132 bool SupportsMobilization(StringPiece user_agent)
const;
148 const RE2 chrome_version_pattern_;
150 mutable map <GoogleString, pair<int, int> > screen_dimensions_map_;
static StringPiece DeviceTypeString(DeviceType device_type)
Definition: fast_wildcard_group.h:94
virtual DeviceType GetDeviceTypeForUAAndHeaders(const StringPiece &user_agent, const RequestHeaders *request_headers) const
virtual DeviceType GetDeviceTypeForUA(const StringPiece &user_agent) const
Returns the DeviceType for the given user agent string.
bool SupportsDnsPrefetchUsingRelPrefetch(const StringPiece &user_agent) const
Definition: user_agent_matcher.h:43
bool IsIe(const StringPiece &user_agent) const
bool SupportsWebpAnimated(const StringPiece &user_agent) const
bool SupportsWebpLosslessAlpha(const StringPiece &user_agent) const
virtual bool GetChromeBuildNumber(const StringPiece &user_agent, int *major, int *minor, int *build, int *patch) const
Definition: user_agent_matcher.h:55
static StringPiece DeviceTypeSuffix(DeviceType device_type)
Returns the suffix for the given device_type.
static const char kTestUserAgentWebP[]
Definition: user_agent_matcher.h:45
bool LegacyWebp(const StringPiece &user_agent) const
DeviceType
Definition: user_agent_matcher.h:49
static const char kTestUserAgentNoWebP[]
Note that this must not contain the substring "webp".
Definition: user_agent_matcher.h:47