net_instaweb::UserAgentMatcher Class Reference

#include "user_agent_matcher.h"

List of all members.

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

Detailed Description

This class contains various user agent based checks. Currently all of these are based on simple wildcard based white- and black-lists.

Todo:
TODO(sriharis): Split the functionality here into two: a matcher that pulls out all relevent information from UA strings (browser-family, version, mobile/tablet/desktop, etc.), and a query interface that can be used by clients.

Member Function Documentation

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.

Todo:
TODO(sriharis): Remove the need for these two separate functions, and refactor the names.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:33:55 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3