Home | History | Annotate | Download | only in common
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CONTENT_PUBLIC_COMMON_USER_AGENT_H_
      6 #define CONTENT_PUBLIC_COMMON_USER_AGENT_H_
      7 
      8 #include <string>
      9 
     10 #include "content/common/content_export.h"
     11 
     12 namespace content {
     13 
     14 // Returns the WebKit version, in the form "major.minor (branch@revision)".
     15 CONTENT_EXPORT std::string GetWebKitVersion();
     16 
     17 // The following 2 functions return the major and minor webkit versions.
     18 CONTENT_EXPORT int GetWebKitMajorVersion();
     19 CONTENT_EXPORT int GetWebKitMinorVersion();
     20 
     21 CONTENT_EXPORT std::string GetWebKitRevision();
     22 
     23 // Builds a User-agent compatible string that describes the OS and CPU type.
     24 CONTENT_EXPORT std::string BuildOSCpuInfo();
     25 
     26 // Helper function to generate a full user agent string from a short
     27 // product name.
     28 CONTENT_EXPORT std::string BuildUserAgentFromProduct(
     29     const std::string& product);
     30 
     31 // Builds a full user agent string given a string describing the OS and a
     32 // product name.
     33 CONTENT_EXPORT std::string BuildUserAgentFromOSAndProduct(
     34     const std::string& os_info,
     35     const std::string& product);
     36 
     37 }  // namespace content
     38 
     39 #endif  // CONTENT_PUBLIC_COMMON_USER_AGENT_H_
     40