Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6378)

Unified Diff: chrome/common/channel_info.h

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/channel_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/channel_info.h
diff --git a/chrome/common/channel_info.h b/chrome/common/channel_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..caa1b60d481b2b0d00e4994456a45596e570dc48
--- /dev/null
+++ b/chrome/common/channel_info.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2011 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 CHROME_COMMON_CHANNEL_INFO_H_
+#define CHROME_COMMON_CHANNEL_INFO_H_
+
+#include <string>
+
+namespace version_info {
+enum class Channel;
+}
+
+namespace chrome {
+
+// Returns a version string to be displayed in "About Chromium" dialog.
+std::string GetVersionString();
+
+// Returns a human-readable modifier for the version string. For a branded
+// build, this modifier is the channel ("canary", "dev", or "beta", but ""
+// for stable). On Windows, this may be modified with additional information
+// after a hyphen. For multi-user installations, it will return "canary-m",
+// "dev-m", "beta-m", and for a stable channel multi-user installation, "m".
+// In branded builds, when the channel cannot be determined, "unknown" will
+// be returned. In unbranded builds, the modifier is usually an empty string
+// (""), although on Linux, it may vary in certain distributions.
+// GetChannelString() is intended to be used for display purposes.
+// To simply test the channel, use GetChannel().
+std::string GetChannelString();
+
+// Returns the channel for the installation. In branded builds, this will be
+// version_info::Channel::{STABLE,BETA,DEV,CANARY}. In unbranded builds, or
+// in branded builds when the channel cannot be determined, this will be
+// version_info::Channel::UNKNOWN.
+version_info::Channel GetChannel();
+
+#if defined(OS_CHROMEOS)
+// Sets channel before use.
+void SetChannel(const std::string& channel);
+#endif
+
+} // namespace chrome
+
+#endif // CHROME_COMMON_CHANNEL_INFO_H_
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/channel_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698