blob: 107440e91de40f798ee73c0cb1b3451fb32e37a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// 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.
#ifndef CONTENT_PUBLIC_COMMON_USER_AGENT_H_
#define CONTENT_PUBLIC_COMMON_USER_AGENT_H_
#include <string>
#include "content/common/content_export.h"
namespace content {
// Returns the WebKit version, in the form "major.minor (branch@revision)".
CONTENT_EXPORT std::string GetWebKitVersion();
// The following 2 functions return the major and minor webkit versions.
CONTENT_EXPORT int GetWebKitMajorVersion();
CONTENT_EXPORT int GetWebKitMinorVersion();
CONTENT_EXPORT std::string GetWebKitRevision();
// Builds a User-agent compatible string that describes the OS and CPU type.
CONTENT_EXPORT std::string BuildOSCpuInfo();
// Helper function to generate a full user agent string from a short
// product name.
CONTENT_EXPORT std::string BuildUserAgentFromProduct(
const std::string& product);
// Helper function to generate a full user agent string given a short
// product name and some extra text to be added to the OS info.
CONTENT_EXPORT std::string BuildUserAgentFromProductAndExtraOSInfo(
const std::string& product,
const std::string& extra_os_info);
// Builds a full user agent string given a string describing the OS and a
// product name.
CONTENT_EXPORT std::string BuildUserAgentFromOSAndProduct(
const std::string& os_info,
const std::string& product);
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_USER_AGENT_H_
|