summaryrefslogtreecommitdiffstats
path: root/chrome/browser/platform_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/platform_util.h')
-rw-r--r--chrome/browser/platform_util.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/chrome/browser/platform_util.h b/chrome/browser/platform_util.h
index 41fa0ed..2cc4c1b 100644
--- a/chrome/browser/platform_util.h
+++ b/chrome/browser/platform_util.h
@@ -6,6 +6,8 @@
#define CHROME_BROWSER_PLATFORM_UTIL_H_
#pragma once
+#include <string>
+
#include "base/string16.h"
#include "ui/gfx/native_widget_types.h"
@@ -14,6 +16,15 @@ class GURL;
namespace platform_util {
+// The possible channels for an installation, from most fun to most stable.
+enum Channel {
+ CHANNEL_UNKNOWN = 0, // Probably blue
+ CHANNEL_CANARY, // Yellow
+ CHANNEL_DEV, // Technicolor
+ CHANNEL_BETA, // Rainbow
+ CHANNEL_STABLE // Full-spectrum
+};
+
// Show the given file in a file manager. If possible, select the file.
void ShowItemInFolder(const FilePath& full_path);
@@ -55,11 +66,24 @@ bool SimpleYesNoBox(gfx::NativeWindow parent,
const string16& title,
const string16& message);
-// Return a human readable modifier for the version string. For a
-// branded Chrome (not Chromium), this modifier is the channel (dev,
-// beta, but "" for stable).
+// 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.
+// GetVersionStringModifier() is intended to be used for display purposes.
+// To simply test the channel, use GetChannel().
std::string GetVersionStringModifier();
+// Returns the channel for the installation. In branded builds, this will be
+// CHANNEL_STABLE, CHANNEL_BETA, CHANNEL_DEV, or CHANNEL_CANARY. In unbranded
+// builds, or in branded builds when the channel cannot be determined, this
+// will be CHANNEL_UNKNOWN.
+Channel GetChannel();
+
// Returns true if the running browser can be set as the default browser.
bool CanSetAsDefaultBrowser();