1 // Copyright 2013 Samsung Electronics. 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.
5 #ifndef VERSION_INFO_H_
6 #define VERSION_INFO_H_
9 #include "base/macros.h"
11 namespace EflWebView {
15 // The possible channels for an installation, from most fun to most stable.
17 CHANNEL_UNKNOWN = 0, // Probably blue
18 CHANNEL_CANARY, // Yellow
19 CHANNEL_DEV, // Technicolor
20 CHANNEL_BETA, // Rainbow
21 CHANNEL_STABLE // Full-spectrum
24 static VersionInfo* GetInstance();
25 static void DeleteInstance();
28 std::string DefaultUserAgent() const;
29 // Get chromium version number
30 std::string GetVersionNumber() const;
31 // E.g. "Chrome/a.b.c.d"
32 std::string VersionForUserAgent() const;
33 // OS type. E.g. "Windows", "Linux", "FreeBSD", ...
34 std::string OSType() const;
36 std::string AppName() const { return product_name_; }
38 void UpdateUserAgentWithAppName(const std::string& name);
40 // To update the default user agent with restored (Session data) User Agent.
41 void UpdateUserAgent(const std::string& user_agent);
43 // Returns the channel for the installation. In branded builds, this will be
44 // CHANNEL_STABLE, CHANNEL_BETA, CHANNEL_DEV, or CHANNEL_CANARY. In unbranded
45 // builds, or in branded builds when the channel cannot be determined, this
46 // will be CHANNEL_UNKNOWN.
47 static Channel GetChannel()
48 { return CHANNEL_DEV; }
54 std::string CreateUserAgent() const;
55 std::string product_name_;
56 std::string system_info_;
57 std::string user_agent_;
58 static VersionInfo* version_info_;
60 DISALLOW_COPY_AND_ASSIGN(VersionInfo);
63 } // namespace EflWebView
65 #endif // VERSION_INFO_H_