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

Unified Diff: chrome/common/chrome_version_info_chromeos.cc

Issue 8883043: Chrome version info getter for Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/chrome_version_info.h ('k') | chrome/common/chrome_version_info_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_version_info_chromeos.cc
===================================================================
--- chrome/common/chrome_version_info_chromeos.cc (revision 0)
+++ chrome/common/chrome_version_info_chromeos.cc (revision 0)
@@ -0,0 +1,50 @@
+// 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.
+
+#include "chrome/common/chrome_version_info.h"
+
+namespace chrome {
+
+static VersionInfo::Channel chromeos_channel = VersionInfo::CHANNEL_UNKNOWN;
+
+// static
+std::string VersionInfo::GetVersionStringModifier() {
+#if defined(GOOGLE_CHROME_BUILD)
+ switch (chromeos_channel) {
+ case CHANNEL_STABLE:
+ return "";
+ case CHANNEL_BETA:
+ return "beta";
+ case CHANNEL_DEV:
+ return "dev";
+ case CHANNEL_CANARY:
+ return "canary";
+ default:
+ return "unknown";
+ }
+#endif
+ return std::string();
+}
+
+// static
+VersionInfo::Channel VersionInfo::GetChannel() {
+ return chromeos_channel;
+}
+
+// static
+void VersionInfo::SetChannel(const std::string& channel) {
+#if defined(GOOGLE_CHROME_BUILD)
+ if (channel == "stable-channel") {
+ chromeos_channel = CHANNEL_STABLE;
+ } else if (channel == "beta-channel") {
+ chromeos_channel = CHANNEL_BETA;
+ } else if (channel == "dev-channel") {
+ chromeos_channel = CHANNEL_DEV;
+ } else if (channel == "canary-channel") {
+ chromeos_channel = CHANNEL_CANARY;
+ }
+#endif
+}
+
+} // namespace chrome
Property changes on: chrome/common/chrome_version_info_chromeos.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/chrome_version_info.h ('k') | chrome/common/chrome_version_info_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698