Chromium Code Reviews| Index: ios/web/public/user_agent.h |
| diff --git a/ios/web/public/user_agent.h b/ios/web/public/user_agent.h |
| index 627875e8153cdfef5be06bc8037b2cf5a12956ae..55214bc0eee8d28229f558c58d7a6a42246063ad 100644 |
| --- a/ios/web/public/user_agent.h |
| +++ b/ios/web/public/user_agent.h |
| @@ -9,6 +9,25 @@ |
| namespace web { |
| +// Enum type specifying a user agent's type. |
| +enum class UserAgentType : short { |
| + // Used for pages that are generated for app-specific URLs. |
| + NONE = 0, |
| + |
| + // The default user agent type. Used to specify a mobile browser user agent. |
|
liaoyuke
2017/02/25 01:28:19
Is it intentional to have multiple white spaces be
kkhorimoto
2017/02/25 01:35:05
Yes. It's a common practice to increase readabili
|
| + MOBILE, |
| + |
| + // Used when requesting the desktop version of a page. |
|
liaoyuke
2017/02/25 01:28:19
Can we make the comments consistent between MOBILE
kkhorimoto
2017/02/25 01:35:05
Done.
|
| + DESKTOP |
| +}; |
| + |
| +// Returns a string representation of |type|. |
| +std::string GetUserAgentTypeDescription(UserAgentType type); |
| + |
| +// Returns a UserAgentType with the given description. If |description| doesn't |
| +// correspond with a UserAgentType, UserAgentType::NONE will be returned. |
| +UserAgentType GetUserAgentTypeWithDescription(const std::string& description); |
| + |
| // Returns the os cpu info portion for a user agent. |
| std::string BuildOSCpuInfo(); |