Update V8 to version 4.6.55.
[chromium-blink-merge.git] / chrome / common / channel_info_chromeos.cc
bloba7df3e8fb43b073ec8c78566d406742d7484bc5a
1 // Copyright (c) 2011 The Chromium Authors. 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 #include "chrome/common/channel_info.h"
7 #include "components/version_info/version_info.h"
9 namespace chrome {
11 static version_info::Channel chromeos_channel = version_info::Channel::UNKNOWN;
13 std::string GetChannelString() {
14 #if defined(GOOGLE_CHROME_BUILD)
15 switch (chromeos_channel) {
16 case version_info::Channel::STABLE:
17 return "";
18 case version_info::Channel::BETA:
19 return "beta";
20 case version_info::Channel::DEV:
21 return "dev";
22 case version_info::Channel::CANARY:
23 return "canary";
24 default:
25 return "unknown";
27 #endif
28 return std::string();
31 version_info::Channel GetChannel() {
32 return chromeos_channel;
35 void SetChannel(const std::string& channel) {
36 #if defined(GOOGLE_CHROME_BUILD)
37 if (channel == "stable-channel") {
38 chromeos_channel = version_info::Channel::STABLE;
39 } else if (channel == "beta-channel") {
40 chromeos_channel = version_info::Channel::BETA;
41 } else if (channel == "dev-channel") {
42 chromeos_channel = version_info::Channel::DEV;
43 } else if (channel == "canary-channel") {
44 chromeos_channel = version_info::Channel::CANARY;
46 #endif
49 } // namespace chrome