blob: 9c7687e9398d3f107b8c41ad17f20c70576bf106 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
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.
// Used to specify a desktop browser user agent.
// 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();
// Returns the user agent to use for the given product name.
// The returned user agent is very similar to that used by Mobile Safari, for
// web page compatibility.
std::string BuildUserAgentFromProduct(const std::string& product);
} // namespace web