#include "user_agent_matcher.h"
Public Types | |
enum | BlinkUserAgentType { kSupportsBlinkDesktop, kSupportsBlinkMobile, kDoesNotSupportBlink } |
Public Member Functions | |
bool | IsIe (const StringPiece &user_agent) const |
bool | IsIe6 (const StringPiece &user_agent) const |
bool | IsIe7 (const StringPiece &user_agent) const |
bool | IsIe6or7 (const StringPiece &user_agent) const |
bool | SupportsImageInlining (const StringPiece &user_agent) const |
BlinkUserAgentType | GetBlinkUserAgentType (const char *user_agent, bool allow_mobile) const |
bool | SupportsJsDefer (const StringPiece &user_agent) const |
bool | SupportsWebp (const StringPiece &user_agent) const |
bool | IsMobileUserAgent (const StringPiece &user_agent) const |
virtual bool | IsAnyMobileUserAgent (const char *user_agent) const |
This class contains various user agent based checks. Currently all of these are based on simple wildcard based white- and black-lists.
BlinkUserAgentType net_instaweb::UserAgentMatcher::GetBlinkUserAgentType | ( | const char * | user_agent, | |
bool | allow_mobile | |||
) | const |
Returns the user agent type for user_agent. The return type currently supports desktop, mobile and not supported.
bool net_instaweb::UserAgentMatcher::IsMobileUserAgent | ( | const StringPiece & | user_agent | ) | const |
The following two functions have similar names, but different functionality. The first one implements a simple restricted wildcard based check of whether user_agent corresponds to a mobile. It is not exhaustive. The second one is meant to check if user_agent matches all currently known mobile user agent pattern.